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