Documentation ¶
Index ¶
- Constants
- func AddClient(client *Client)
- func IsUserOnline(appid, uid int64) bool
- func NewRoute(appid int64) model.RouteBase
- func RemoveClient(client *Client)
- type Client
- func (client *Client) ContainAppRoomID(id *model.AppRoomID) bool
- func (client *Client) ContainAppUserID(id *model.AppUserID) bool
- func (client *Client) GetAppRoute() *model.AppRoute
- func (client *Client) HandleMessage(msg *model.Message)
- func (client *Client) HandlePublish(amsg *model.AppMessage)
- func (client *Client) HandlePublishGroup(amsg *model.AppMessage)
- func (client *Client) HandlePublishRoom(amsg *model.AppMessage)
- func (client *Client) HandleSubscribe(id *model.SubscribeMessage)
- func (client *Client) HandleSubscribeRoom(id *model.AppRoomID)
- func (client *Client) HandleUnsubscribe(id *model.AppUserID)
- func (client *Client) HandleUnsubscribeRoom(id *model.AppRoomID)
- func (client *Client) IsAppUserOnline(id *model.AppUserID) bool
- func (client *Client) IsROMApp(appid int64) bool
- func (client *Client) PublishCustomerMessage(appid, receiver int64, cs *model.CustomerMessage, cmd int)
- func (client *Client) PublishGroupMessage(appid int64, receivers []int64, im *model.IMMessage)
- func (client *Client) PublishPeerMessage(appid int64, im *model.IMMessage)
- func (client *Client) PublishSystemMessage(appid, receiver int64, content string)
- func (client *Client) Push()
- func (client *Client) PushChan(queue_name string, b []byte)
- func (client *Client) PushQueue(ps []*Push)
- func (client *Client) Read()
- func (client *Client) Run()
- func (client *Client) Write()
- type ClientSet
- type Push
- type Route
- func (route *Route) AddRoomID(room_id int64)
- func (route *Route) AddUserID(uid int64, online bool)
- func (route *Route) ContainRoomID(room_id int64) bool
- func (route *Route) ContainUserID(uid int64) bool
- func (route *Route) GetAppID() int64
- func (route *Route) GetUserIDs() model.IntSet
- func (route *Route) IsUserOnline(uid int64) bool
- func (route *Route) RemoveRoomID(room_id int64)
- func (route *Route) RemoveUserID(uid int64)
Constants ¶
View Source
const PUSH_QUEUE_TIMEOUT = 300
Variables ¶
This section is empty.
Functions ¶
func IsUserOnline ¶
func RemoveClient ¶
func RemoveClient(client *Client)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetAppRoute ¶
func (*Client) HandleMessage ¶
func (*Client) HandlePublish ¶
func (client *Client) HandlePublish(amsg *model.AppMessage)
func (*Client) HandlePublishGroup ¶
func (client *Client) HandlePublishGroup(amsg *model.AppMessage)
群聊消息广播
func (*Client) HandlePublishRoom ¶
func (client *Client) HandlePublishRoom(amsg *model.AppMessage)
func (*Client) HandleSubscribe ¶
func (client *Client) HandleSubscribe(id *model.SubscribeMessage)
在线请求
func (*Client) HandleSubscribeRoom ¶
func (*Client) HandleUnsubscribe ¶
离线请求
func (*Client) HandleUnsubscribeRoom ¶
func (*Client) PublishCustomerMessage ¶
func (client *Client) PublishCustomerMessage(appid, receiver int64, cs *model.CustomerMessage, cmd int)
func (*Client) PublishGroupMessage ¶
func (*Client) PublishPeerMessage ¶
离线消息入apns队列
func (*Client) PublishSystemMessage ¶
type ClientSet ¶
type ClientSet map[*Client]struct{}
func FindClientSet ¶
func FindRoomClientSet ¶
func NewClientSet ¶
func NewClientSet() ClientSet
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
路由本身有routemanger管理
func (*Route) RemoveUserID ¶
Click to show internal directories.
Click to hide internal directories.