func ExampleServer_Handle() { s := gs.NewServer() s.Handle("/hello", printHandler) s.Handle("/hello", responseHandler) http.Handle("/gs/", s) http.HandleFunc("/", index) http.ListenAndServe(":6060", nil) }
func ExampleServer() { s := gs.NewServer() s.On(gs.Connect, func(c *gs.Conn) { c.Send("hello", "world") }) http.ListenAndServe(":6060", s) }