Documentation
¶
Index ¶
- Variables
- func AddSid(sid string, area_id string) bool
- func Broatcast(sid string, area_id string, msg []byte)
- func BroatcastGlobal(sid string, msg []byte)
- func CheckExist(area_id string) bool
- func CheckSid(sid string) bool
- func CheckUserJoined(area_id string, sid string) bool
- func ConnRegister(conn *net.TCPConn, sid string)
- func Create(area_id string, name string)
- func CreateSid() string
- func DeleteConn(sid string)
- func DeleteSession(sid string)
- func DeleteUserJoinedAreas(sid string)
- func DeleteUserssion(sid string)
- func DeleteWsConn(sid string)
- func FreeConn(conn *net.TCPConn, sid string)
- func FreeWsConn(ws *websocket.Conn, sid string)
- func GetConn(sid string) *net.TCPConn
- func GetSids(area_id string) []string
- func GetWsConn(sid string) *websocket.Conn
- func Gets() map[string]string
- func InitConfig()
- func Push(to_sid string, from_sid string, to_data []byte)
- func Remove(id string)
- func Subscribe(area_id string, conn *net.TCPConn, sid string)
- func UnSubGlobal(sid string)
- func UnSubscribe(area_id string, sid string)
- func UserUnSubscribe(user_sid string)
- func WsConnRegister(ws *websocket.Conn, user_sid string)
- func WsSubscribe(area_id string, ws *websocket.Conn, sid string)
- type AreaType
- type Session
Constants ¶
This section is empty.
Variables ¶
View Source
var AllConns *syncmap.SyncMap
所有的用户连接对象
View Source
var AllWsConns *syncmap.SyncMap
View Source
var Areas = make([]string, 0, 1000)
所有的场景名称列表
View Source
var AreasMap *syncmap.SyncMap
场景集合
View Source
var UserJoinedAreas *syncmap.SyncMap
用户加入过的场景列表
Functions ¶
func ConnRegister ¶
func DeleteConn ¶
func DeleteConn(sid string)
func DeleteSession ¶
func DeleteSession(sid string)
func DeleteUserJoinedAreas ¶
func DeleteUserJoinedAreas(sid string)
func DeleteUserssion ¶
func DeleteUserssion(sid string)
func DeleteWsConn ¶
func DeleteWsConn(sid string)
func FreeWsConn ¶
func UnSubGlobal ¶
func UnSubGlobal(sid string)
func WsConnRegister ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.