public static void writeMessage(TcpClient client, AbstractMessage message) { StreamWriter writer = new StreamWriter(client.GetStream()); writer.Write(message.toXml().InnerXml.ToString()); writer.Flush(); //writer.Close(); }
public void receiveMessage(AbstractMessage message) { ChatMessage chatMessage = (ChatMessage)message; rtChat.AppendText( String.Format("{0} => {1} : {2}", chatMessage.from.name, chatMessage.to.name, chatMessage.content) ); }
public void update(AbstractMessage message) { ChatMessage msg = (ChatMessage) message; rtChat.AppendText(msg.content+"\n"); }
public void receiveMessage(AbstractMessage message) { throw new System.NotImplementedException(); }
public void sendMessageOut(AbstractMessage message) { serverConnection.queueMessageOut(message); }
public void writeMessage(AbstractMessage message) { writeMessage(client, message); }
/// <summary> /// Adds message into the incoming message queue /// </summary> /// <param name="message">Message object to be send</param> public void queueMessageIn(AbstractMessage message) { messageQueueIn.Enqueue(message); }
/// <summary> /// Add message into the outgoing message queue /// </summary> /// <param name="message">Message to queue</param> public void queueMessageOut(AbstractMessage message) { messageQueueOut.Enqueue(message); }
public void send(AbstractMessage message) { model.send(message); }