Пример #1
0
 public void SendMessage(Message message)
 {
     while (mOutgoingMessage == null) ;
     mOutgoingMessage.Write(message.ToString());
     NetDeliveryMethod method = NetDeliveryMethod.ReliableOrdered;
     mPeer.SendMessage(mOutgoingMessage, connection, method);
     mOutgoingMessage = mPeer.CreateMessage();
 }
Пример #2
0
 public void displayIncoming(Message message)
 {
     while (!writing);
     displaying = true;
     if (message != null)
         Console.WriteLine("{0}: {1}", message.getSenderName(), message.getContents());
     displaying = false;
 }