Documentation ¶
Index ¶
- func WrapH(s *gosocketio.Server) http.HandlerFunc
- type ConnectParam
- type RoomDescribe
- type RoomDescribeListResponse
- type SocketioServer
- func (socket *SocketioServer) Ack(eventName string, userID string, deviceType string)
- func (socket *SocketioServer) Debug(data any)
- func (socket *SocketioServer) Error(data any)
- func (socket *SocketioServer) Info(data any)
- func (socket *SocketioServer) ListAllSocket() (map[string]string, map[int64]map[string][]*ConnectParam)
- func (socket *SocketioServer) ListRooms() []RoomDescribe
- func (socket *SocketioServer) NewID() string
- func (socket *SocketioServer) Run(httpServer *http.Server)
- func (socket *SocketioServer) SendEventToDevice(deviceIDList []string, event string, message interface{}) (successList []string, failList []string, err error)
- func (socket *SocketioServer) SendEventToUser(userIDList []int64, deviceType string, event string, message interface{}) error
- func (socket *SocketioServer) SendNoticeToUser(userID int64, message interface{})
- func (socket *SocketioServer) Warn(data any)
- type UserType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapH ¶
func WrapH(s *gosocketio.Server) http.HandlerFunc
Types ¶
type ConnectParam ¶
type RoomDescribe ¶
type RoomDescribeListResponse ¶
type RoomDescribeListResponse []RoomDescribe
type SocketioServer ¶
type SocketioServer struct { Socketio *gosocketio.Server FrontLoginInfoMap map[int64]map[string][]*ConnectParam //前端登录信息 // contains filtered or unexported fields }
func NewSocketioServer ¶
func NewSocketioServer(logger log.Logger) *SocketioServer
func (*SocketioServer) Ack ¶
func (socket *SocketioServer) Ack(eventName string, userID string, deviceType string)
Ack 判断通知是否被读
func (*SocketioServer) Debug ¶
func (socket *SocketioServer) Debug(data any)
func (*SocketioServer) Error ¶
func (socket *SocketioServer) Error(data any)
func (*SocketioServer) Info ¶
func (socket *SocketioServer) Info(data any)
func (*SocketioServer) ListAllSocket ¶
func (socket *SocketioServer) ListAllSocket() (map[string]string, map[int64]map[string][]*ConnectParam)
func (*SocketioServer) ListRooms ¶
func (socket *SocketioServer) ListRooms() []RoomDescribe
ListRooms 返回所有的房间以及房间里的成员
func (*SocketioServer) NewID ¶
func (socket *SocketioServer) NewID() string
func (*SocketioServer) Run ¶
func (socket *SocketioServer) Run(httpServer *http.Server)
func (*SocketioServer) SendEventToDevice ¶
func (*SocketioServer) SendEventToUser ¶
func (socket *SocketioServer) SendEventToUser(userIDList []int64, deviceType string, event string, message interface{}) error
func (*SocketioServer) SendNoticeToUser ¶
func (socket *SocketioServer) SendNoticeToUser(userID int64, message interface{})
func (*SocketioServer) Warn ¶
func (socket *SocketioServer) Warn(data any)
Click to show internal directories.
Click to hide internal directories.