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