Documentation ¶
Index ¶
- Variables
- type Client
- type Server
- func (s *Server) AddClient(c *Client)
- func (s *Server) Broadcast(eventType string, data interface{}) error
- func (s *Server) OnConnect(f func(*Client))
- func (s *Server) RemoveClient(c *Client)
- func (s *Server) Serve(w http.ResponseWriter, r *http.Request) error
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ID string // contains filtered or unexported fields }
func (*Client) OnDisconnect ¶
func (c *Client) OnDisconnect(f func())
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) RemoveClient ¶
Click to show internal directories.
Click to hide internal directories.