Documentation ¶
Index ¶
- type Connect
- func (v *Connect) CallHandler(b []byte)
- func (v *Connect) CancelFunc() context.CancelFunc
- func (v *Connect) Close()
- func (v *Connect) Connect() *websocket.Conn
- func (v *Connect) ConnectID() string
- func (v *Connect) Done() <-chan struct{}
- func (v *Connect) Encode(eid event.Id, in interface{})
- func (v *Connect) Head(key string) string
- func (v *Connect) OnClose(cb func(cid string))
- func (v *Connect) OnOpen(cb func(cid string))
- func (v *Connect) ReadBus() <-chan []byte
- func (v *Connect) Run()
- func (v *Connect) WriteToBus(b []byte)
- type EventHandler
- type Meta
- type Request
- type Response
- type Server
- func (v *Server) AddConn(c *Connect)
- func (v *Server) Broadcast(eid event.Id, m interface{})
- func (v *Server) CloseAll()
- func (v *Server) CountConn() (cc int)
- func (v *Server) DelConn(id string)
- func (v *Server) ErrLog(cid string, err error, msg string, args ...interface{})
- func (v *Server) ErrLogMessage(cid string, msg string, args ...interface{})
- func (v *Server) GetHandler(eid event.Id) (h EventHandler, ok bool)
- func (v *Server) Handling(w http.ResponseWriter, r *http.Request)
- func (v *Server) SendEvent(eid event.Id, m interface{}, cids ...string)
- func (v *Server) SetHandler(call EventHandler, eids ...event.Id)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connect ¶
type Connect struct {
// contains filtered or unexported fields
}
func NewConnect ¶
func (*Connect) CallHandler ¶
func (*Connect) CancelFunc ¶
func (v *Connect) CancelFunc() context.CancelFunc
func (*Connect) WriteToBus ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ErrLogMessage ¶
func (*Server) GetHandler ¶
func (v *Server) GetHandler(eid event.Id) (h EventHandler, ok bool)
func (*Server) SetHandler ¶
func (v *Server) SetHandler(call EventHandler, eids ...event.Id)
Click to show internal directories.
Click to hide internal directories.