Documentation ¶
Index ¶
- func NewServer(provider transport.GateProvider, opts *server.Options) (*server.Server, error)
- func WaitChData(packet *tcp.ReplyPacket, reply proto.Message) error
- type Client
- func (c *Client) Bind(ctx context.Context, cid, uid int64) (miss bool, err error)
- func (c *Client) BlockConn(ctx context.Context, onid string, nnid string, target uint64) (err error)
- func (c *Client) Broadcast(ctx context.Context, kind session.Kind, message *transport.Message) (total int64, err error)
- func (c *Client) Disconnect(ctx context.Context, kind session.Kind, target int64, isForce bool) (miss bool, err error)
- func (c *Client) GetID(ctx context.Context, kind session.Kind, target int64) (id int64, err error)
- func (c *Client) GetIP(ctx context.Context, kind session.Kind, target int64) (ip string, miss bool, err error)
- func (c *Client) IsOnline(ctx context.Context, kind session.Kind, target int64) (isOnline, miss bool, err error)
- func (c *Client) Multicast(ctx context.Context, kind session.Kind, targets []int64, ...) (total int64, err error)
- func (c *Client) Ping(ctx context.Context, message string) (replyMessage string, err error)
- func (c *Client) Push(ctx context.Context, kind session.Kind, target int64, ...) (miss bool, err error)
- func (c *Client) Stat(ctx context.Context, kind session.Kind) (total int64, miss bool, err error)
- func (c *Client) Trigger(ctx context.Context, args *transport.TriggerArgs) (miss bool, err error)
- func (c *Client) Unbind(ctx context.Context, uid int64) (miss bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitChData ¶
func WaitChData(packet *tcp.ReplyPacket, reply proto.Message) error
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Broadcast ¶
func (c *Client) Broadcast(ctx context.Context, kind session.Kind, message *transport.Message) (total int64, err error)
Broadcast 推送广播消息
func (*Client) Disconnect ¶
func (*Client) Multicast ¶
func (c *Client) Multicast(ctx context.Context, kind session.Kind, targets []int64, message *transport.Message) (total int64, err error)
Multicast 推送组播消息
func (*Client) Push ¶
func (c *Client) Push(ctx context.Context, kind session.Kind, target int64, message *transport.Message) (miss bool, err error)
Push 推送消息
Click to show internal directories.
Click to hide internal directories.