mirror of
https://github.com/mochi-mqtt/server.git
synced 2025-10-24 00:23:17 +08:00
Update example code to use new NewServer function instead of deprecated New
This commit is contained in:
@@ -25,7 +25,7 @@ func main() {
|
||||
|
||||
fmt.Println(aurora.Magenta("Mochi MQTT Server initializing..."), aurora.Cyan("TCP"))
|
||||
|
||||
server := mqtt.New()
|
||||
server := mqtt.NewServer(nil)
|
||||
tcp := listeners.NewTCP("t1", ":1883")
|
||||
err := server.AddListener(tcp, &listeners.Config{
|
||||
Auth: new(auth.Allow),
|
||||
|
||||
Reference in New Issue
Block a user