private void ChatClientForm_Load(object sender, EventArgs e) { m_ChatClient.SetIoFilter(new MessageCodec(1024 * 1024 * 2)); // set max buffer size to 2m ... m_ChatClient.SetIoHandler(new ClientNetworkEventHandler(this)); }