Versions in this module Expand all Collapse all v0 v0.2.0 May 14, 2020 v0.1.1 May 13, 2020 Changes in this version + func Broadcast(clients []*Client, event string, data interface{}) error + type Client struct + func NewClient(url string, header http.Header) (*Client, error) + func (cl *Client) Close(code uint16) error + func (cl *Client) Listen() error + func (cl *Client) On(event string, handler func(data interface{})) + func (cl *Client) OnClose(event string, handler func()) + func (cl *Client) Send(event string, data interface{}) error + type Server struct + func NewServer() *Server + func (s *Server) Clients() []*Client + func (s *Server) On(event string, handler func(cl *Client, data interface{})) + func (s *Server) OnClose(handler func(cl *Client, code int)) + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)