Documentation ¶
Index ¶
- type Server
- func (l *Server) Close()
- func (l *Server) Connect(c context.Context, server, serverKey, cookie string, token []byte) (mid int64, key, roomID string, paltform string, accepts []int32, err error)
- func (l *Server) Disconnect(c context.Context, mid int64, key, server string) (has bool, err error)
- func (l *Server) Heartbeat(c context.Context, mid int64, key, server string) (err error)
- func (l *Server) OnlineRoom(c context.Context, rooms []string) (res map[string]int32, err error)
- func (l *Server) OnlineTop(c context.Context, typeStr string, n int64) (addrs []string, err error)
- func (l *Server) Ping(c context.Context) (err error)
- func (l *Server) PushAll(c context.Context, op, speed int32, platform string, msg []byte) (err error)
- func (l *Server) PushKeys(c context.Context, op int32, keys []string, msg []byte) (err error)
- func (l *Server) PushMids(c context.Context, op int32, mids []int64, msg []byte) (err error)
- func (l *Server) PushRoom(c context.Context, op int32, room string, msg []byte) (err error)
- func (l *Server) Receive(c context.Context, mid int64, room string, op int32, msg []byte) (err error)
- func (l *Server) RenewOnline(c context.Context, server string, roomCount map[string]int32) (allRoomCount map[string]int32, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Logic Server struct
func (*Server) Connect ¶
func (l *Server) Connect(c context.Context, server, serverKey, cookie string, token []byte) (mid int64, key, roomID string, paltform string, accepts []int32, err error)
Connect connected a conn.
func (*Server) Disconnect ¶
Disconnect disconnect a conn.
func (*Server) OnlineRoom ¶
OnlineRoom get rooms online.
func (*Server) PushAll ¶
func (l *Server) PushAll(c context.Context, op, speed int32, platform string, msg []byte) (err error)
PushAll push a message to all.
Click to show internal directories.
Click to hide internal directories.