summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/olahol/melody/doc.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/olahol/melody/doc.go')
-rw-r--r--vendor/github.com/olahol/melody/doc.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/github.com/olahol/melody/doc.go b/vendor/github.com/olahol/melody/doc.go
new file mode 100644
index 00000000..b54b6d4a
--- /dev/null
+++ b/vendor/github.com/olahol/melody/doc.go
@@ -0,0 +1,22 @@
+// Copyright 2015 Ola Holmström. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package melody implements a framework for dealing with WebSockets.
+//
+// Example
+//
+// A broadcasting echo server:
+//
+// func main() {
+// m := melody.New()
+// 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)
+// })
+// http.ListenAndServe(":5000", nil)
+// }
+
+package melody