mirror of
https://github.com/mochi-mqtt/server.git
synced 2025-10-20 14:55:20 +08:00
Update example code to use new NewServer function instead of deprecated New
This commit is contained in:
@@ -24,7 +24,7 @@ func main() {
|
||||
|
||||
fmt.Println(aurora.Magenta("Mochi MQTT Server initializing..."), aurora.Cyan("TCP"))
|
||||
|
||||
server := mqtt.New()
|
||||
server := mqtt.NewServer(nil)
|
||||
ws := listeners.NewWebsocket("ws1", ":1882")
|
||||
err := server.AddListener(ws, nil)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user