Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UserConnMap sync.Map
UserConnMap is a sync.Map to store use conn
View Source
var UserConnPool = sync.Pool{New: func() interface{} { return new(UserConn) }}
Functions ¶
This section is empty.
Types ¶
type UserConn ¶
type UserConn struct { UserPhone string MsgHandler func(*pb.Msg, *UserConn) OnClose func(string) error // contains filtered or unexported fields }
func NewUserConn ¶
func (*UserConn) ResetUserConn ¶
func (*UserConn) StartReadMessage ¶
func (conn *UserConn) StartReadMessage()
Click to show internal directories.
Click to hide internal directories.