Documentation ¶
Index ¶
- type Agent
- type ChannelRemote
- type Connection
- type Connector
- type SessionMap
- type SessionRemote
- func (s *SessionRemote) Bind(ctx context.Context, args *rpc.Args, reply *rpc.Reply) error
- func (s *SessionRemote) GetSessionCount(ctx context.Context, args *rpc.Args, reply *rpc.Reply) error
- func (s *SessionRemote) KickBySid(ctx context.Context, args *rpc.Args, reply *rpc.Reply) error
- func (s *SessionRemote) Push(ctx context.Context, args *rpc.Args, reply *rpc.Reply) error
- func (s *SessionRemote) UnBind(ctx context.Context, args *rpc.Args, reply *rpc.Reply) error
- type TimeJob
- type Timers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelRemote ¶
type ChannelRemote struct {
// contains filtered or unexported fields
}
func NewChannelRemote ¶
func NewChannelRemote(conn Connector) *ChannelRemote
func (*ChannelRemote) Broadcast ¶
func (c *ChannelRemote) Broadcast(ctx context.Context, args *rpc.ArgsGroup, reply *rpc.ReplyGroup) error
Broadcast to all the client connectd with current frontend server.
func (*ChannelRemote) PushMessageByGroup ¶
func (c *ChannelRemote) PushMessageByGroup(ctx context.Context, args *rpc.ArgsGroup, reply *rpc.ReplyGroup) error
Push message to client by uids.
type Connection ¶
type Connector ¶
type Connector interface {
GetSessionMap() *SessionMap
}
type SessionMap ¶
type SessionMap struct {
// contains filtered or unexported fields
}
goroutine safe
func (*SessionMap) AddSession ¶
func (s *SessionMap) AddSession(a Agent)
func (*SessionMap) DelSession ¶
func (s *SessionMap) DelSession(a Agent)
func (*SessionMap) GetSessionCount ¶
func (s *SessionMap) GetSessionCount() int32
func (*SessionMap) Range ¶
func (s *SessionMap) Range(f func(k, v interface{}) bool)
type SessionRemote ¶
type SessionRemote struct {
// contains filtered or unexported fields
}
func NewSessionRemote ¶
func NewSessionRemote(c Connector) *SessionRemote
func (*SessionRemote) GetSessionCount ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.