better docs

This commit is contained in:
Ola Holmström
2015-06-21 13:40:28 +02:00
parent aa1f858055
commit 5c5e059a07
4 changed files with 34 additions and 15 deletions
+19
View File
@@ -0,0 +1,19 @@
package melody
// Package melody implements a framework for dealing with WebSockets.
//
// Example
//
// 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)
// })
// m.HandleMessage(func(s *melody.Session, msg []byte) {
// m.Broadcast(msg)
// })
// r.Run(":5000")
// }