// handlers private void HandleChatMessage(byte[] data) { var chat = data.Deserialize <ChatData>(); // log to view _chatPanel.AddLog(chat.author + ": " + chat.entry); }
// handlers private void HandleChatMessage(ArraySegment <byte> chatData) { var chat = chatData.Deserialize <ChatPacket>(); // log to view _chatPanel.AddLog(chat.author + ": " + chat.entry); }