Update doc.go
This commit is contained in:
@@ -9,14 +9,14 @@
|
||||
// A broadcasting echo server:
|
||||
//
|
||||
// func main() {
|
||||
// r := gin.Default()
|
||||
// m := melody.New()
|
||||
// r.GET("/ws", func(c *gin.Context) {
|
||||
// m.HandleRequest(c.Writer, c.Request)
|
||||
// http.HandleFunc("/ws", func(w http.ResponseWriter, r *http.Request) {
|
||||
// m.HandleRequest(w, r)
|
||||
// })
|
||||
// m.HandleMessage(func(s *melody.Session, msg []byte) {
|
||||
// m.Broadcast(msg)
|
||||
// })
|
||||
// r.Run(":5000")
|
||||
// http.ListenAndServe(":5000", nil)
|
||||
// }
|
||||
|
||||
package melody
|
||||
|
||||
Reference in New Issue
Block a user