Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the representation of a listener.
type Message ¶
type Message struct {
Data interface{} `json:"data"`
}
Message is the data to send back
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents Websocket server
func (*Server) Listen ¶
func (s *Server) Listen()
Listen and serve. It serves client connection and broadcast request.
func (*Server) OnConnected ¶
OnConnected is the function to be passed to http.Handle(), wrapped in a websocket.Handler().
Click to show internal directories.
Click to hide internal directories.