mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-03 08:50:13 +02:00
strongly typed session events channel.
This commit is contained in:
parent
f3080713ce
commit
2649594c2e
4 changed files with 62 additions and 59 deletions
|
@ -78,8 +78,8 @@ func (session *Session) SetPeer(peer types.Peer) error {
|
|||
func (session *Session) SetConnected(connected bool) error {
|
||||
session.connected = connected
|
||||
if connected {
|
||||
session.manager.sessionChannel <- types.SessionInformation{
|
||||
Type: "connected",
|
||||
session.manager.eventsChannel <- types.SessionEvent{
|
||||
Type: types.SESSION_CONNECTED,
|
||||
Id: session.id,
|
||||
Session: session,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue