Exemplo n.º 1
0
 protected void OnMessageReceived(Message message)
 {
     if (MessageReceived != null)
     {
         MessageReceived.Invoke(this, message);
     }
 }
Exemplo n.º 2
0
 public void PushMessage(Message item)
 {
     lock(writeQueue)
         writeQueue.Enqueue(item);
     if (canWrite)
     {
         WriteNewMessage();
     }
 }
Exemplo n.º 3
0
 public void ProccessLogin(Client client, Message message)
 {
     if (message.Header.PacketType == 1)
         client.PushMessage(new LoginSuccessMessage());
 }