diff --git a/README-CN.md b/README-CN.md index 6bc147dd..da12773b 100644 --- a/README-CN.md +++ b/README-CN.md @@ -149,7 +149,7 @@ func main() { _ = server.AddHook(new(auth.AllowHook), nil) // 在标1883端口上创建一个 TCP 服务端。 - tcp := listeners.NewTCP("t1", ":1883", nil) + tcp := listeners.NewTCP(listeners.Config{ID: "t1", Address: ":1883"}) err := server.AddListener(tcp) if err != nil { log.Fatal(err) diff --git a/README-JP.md b/README-JP.md index 3cb9d868..32ef86aa 100644 --- a/README-JP.md +++ b/README-JP.md @@ -119,7 +119,7 @@ func main() { _ = server.AddHook(new(auth.AllowHook), nil) // Create a TCP listener on a standard port. - tcp := listeners.NewTCP("t1", ":1883", nil) + tcp := listeners.NewTCP(listeners.Config{ID: "t1", Address: ":1883"}) err := server.AddListener(tcp) if err != nil { log.Fatal(err) diff --git a/README.md b/README.md index 47601d60..4deddc62 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ func main() { _ = server.AddHook(new(auth.AllowHook), nil) // Create a TCP listener on a standard port. - tcp := listeners.NewTCP("t1", ":1883", nil) + tcp := listeners.NewTCP(listeners.Config{ID: "t1", Address: ":1883"}) err := server.AddListener(tcp) if err != nil { log.Fatal(err)