private void Connector_MessageReceived(object sender, Mina.Core.Session.IoSessionMessageEventArgs e) { if (listener != null) { IPacket packet = Packet.GetPacket(e.Message.ToString()); if (packet != null) { listener.HandleMessage(packet); } } }