Versions in this module Expand all Collapse all v1 v1.0.1 Feb 17, 2024 Changes in this version + const HeaderForward + const OnConnection + const OnDisconnection + const OnError + var ErrorCallerMaxOneValue = errors.New("f should return not more than one value") + var ErrorCallerNot2Args = errors.New("f should have 1 or 2 args") + var ErrorCallerNotFunc = errors.New("f is not function") + var ErrorConnectionNotFound = errors.New("Connection not found") + var ErrorSendTimeout = errors.New("Timeout") + var ErrorServerNotSet = errors.New("Server not set") + var ErrorSocketOverflood = errors.New("Socket overflood") + var ErrorWaiterNotFound = errors.New("Waiter not found") + var ErrorWrongHeader = errors.New("Wrong header") + func GetUrl(host string, port int, secure bool) string + type Channel struct + func (c *Channel) Ack(method string, args interface{}, timeout time.Duration) (string, error) + func (c *Channel) Amount(room string) int + func (c *Channel) BroadcastTo(room, method string, args interface{}) + func (c *Channel) Close() + func (c *Channel) Emit(method string, args interface{}) error + func (c *Channel) Id() string + func (c *Channel) Ip() string + func (c *Channel) IsAlive() bool + func (c *Channel) Join(room string) error + func (c *Channel) Leave(room string) error + func (c *Channel) List(room string) []*Channel + func (c *Channel) Request() *http.Request + func (c *Channel) RequestHeader() http.Header + type Client struct + func Dial(url string, tr transport.Transport) (*Client, error) + func (c *Client) Close() + func (m *Client) On(method string, f interface{}) error + type Header struct + PingInterval int + PingTimeout int + Sid string + Upgrades []string + type Server struct + func NewServer(tr transport.Transport) *Server + func (m *Server) On(method string, f interface{}) error + func (s *Server) AddHeader(name string, value string) + func (s *Server) Amount(room string) int + func (s *Server) AmountOfRooms() int64 + func (s *Server) AmountOfSids() int64 + func (s *Server) BroadcastTo(room, method string, args interface{}) + func (s *Server) BroadcastToAll(method string, args interface{}) + func (s *Server) EnableCORS(domain string) + func (s *Server) GetChannel(sid string) (*Channel, error) + func (s *Server) List(room string) []*Channel + func (s *Server) SendOpenSequence(c *Channel) + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (s *Server) SetupEventLoop(conn transport.Connection, remoteAddr string, r *http.Request) + func (s *Server) UpdateTransport(tr transport.Transport)