mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
WS remove connected & disconnected event.
This commit is contained in:
parent
d7b5bd6842
commit
7eee6debc7
@ -15,8 +15,6 @@ const (
|
|||||||
const (
|
const (
|
||||||
MEMBER_CREATED = "member/created"
|
MEMBER_CREATED = "member/created"
|
||||||
MEMBER_DELETED = "member/deleted"
|
MEMBER_DELETED = "member/deleted"
|
||||||
MEMBER_CONNECTED = "member/connected"
|
|
||||||
MEMBER_DISCONNECTED = "member/disconnected"
|
|
||||||
MEMBER_PROFILE = "member/profile"
|
MEMBER_PROFILE = "member/profile"
|
||||||
MEMBER_STATE = "member/state"
|
MEMBER_STATE = "member/state"
|
||||||
)
|
)
|
||||||
|
@ -56,13 +56,7 @@ func (h *MessageHandlerCtx) SessionConnected(session types.Session) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
h.sessions.Broadcast(
|
return h.SessionStateChanged(session)
|
||||||
message.MemberID{
|
|
||||||
Event: event.MEMBER_CONNECTED,
|
|
||||||
ID: session.ID(),
|
|
||||||
}, nil);
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *MessageHandlerCtx) SessionDisconnected(session types.Session) error {
|
func (h *MessageHandlerCtx) SessionDisconnected(session types.Session) error {
|
||||||
@ -83,13 +77,7 @@ func (h *MessageHandlerCtx) SessionDisconnected(session types.Session) error {
|
|||||||
}, nil)
|
}, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
h.sessions.Broadcast(
|
return h.SessionStateChanged(session)
|
||||||
message.MemberID{
|
|
||||||
Event: event.MEMBER_DISCONNECTED,
|
|
||||||
ID: session.ID(),
|
|
||||||
}, nil);
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *MessageHandlerCtx) SessionProfileChanged(session types.Session) error {
|
func (h *MessageHandlerCtx) SessionProfileChanged(session types.Session) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user