Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteToUser ¶
WriteToUser 将信息写给某个 user 的所有 session
Types ¶
type ConnWrapper ¶
func GetConnByUserID ¶
func GetConnByUserID(userID int64) []*ConnWrapper
GetConnByUserID 获得某个 user 的全部 conn
func PutConn ¶
func PutConn(sessionID string, userID int64, conn *websocket.Conn) *ConnWrapper
PutConn 加入新的 ConnWrapper
func (*ConnWrapper) Write ¶
func (wrapper *ConnWrapper) Write(v interface{}) error
Write 向消息队列中写入 json object 的指针
Click to show internal directories.
Click to hide internal directories.