예제 #1
0
 public override void OnMessage(string message) => Sockets.Broadcast(MessagesHelper.Create(color: _user.Color, message: message, type: "standard", from: _user.Name));
예제 #2
0
 public override void OnClose()
 {
     Sockets.Remove(this);
     Sockets.Broadcast(MessagesHelper.Create(color: _user.Color, message: "left.", type: "logout", from: _user.Name));
 }
예제 #3
0
 public override void OnOpen()
 {
     Sockets.Add(this);
     Sockets.Broadcast(MessagesHelper.Create(color: _user.Color, message: "joined.", type: "joined", from: _user.Name));
     Send(MessagesHelper.Create(color: _user.Color, message: "Welcome", type: "welcome", from: _user.Name));
 }