Documentation ¶
Index ¶
- Constants
- type AuthFunc
- type Events
- type Message
- type MessageFunc
- type Server
- func (s *Server) AddTopic(topicName string, defaultTopic bool) error
- func (s *Server) BroadCast(topic string, payload interface{}) error
- func (s *Server) ListenAndServe(addr string) error
- func (s *Server) ListenAndServeTLS(addr string, certFile string, keyFile string) error
- func (s *Server) ListenAndServeTLSEmbed(addr string, cert []byte, key []byte) error
- func (s *Server) SendToUser(topic string, payload interface{}, userID int64) error
- type User
Constants ¶
View Source
const ( MessageTypeAuth = 0 MessageTypeBroadcast = 1 MessageTypeAssigned = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Events ¶
type Events struct { OnAuth AuthFunc OnMessage MessageFunc }
type MessageFunc ¶
type Server ¶
type Server struct { Events *Events // contains filtered or unexported fields }
func (*Server) ListenAndServe ¶
func (*Server) ListenAndServeTLS ¶
func (*Server) ListenAndServeTLSEmbed ¶
Click to show internal directories.
Click to hide internal directories.