/// <summary> /// 数据解析完成后的处理 /// </summary> /// <param name="client"></param> /// <param name="value"></param> private void ReceiveCompleted(ClientPeer client, SocketMsg value) { application.OnReceive(client, value); }
/// <summary> /// 发送网络消息 /// </summary> /// <param name="msg"></param> public void Send(SocketMsg msg) { byte[] data = EncodeHelper.EncodeMsg(msg); byte[] packet = EncodeHelper.EncodePacket(data); Send(packet); }