/// <summary> /// 发送数据 /// </summary> /// <param name="packet">网络数据包</param> public IAwait Send(object packet) { Exception ex; var data = packer.Encode(packet, out ex); if (ex != null) { OnSocketError(ex); throw ex; } return(Send(data)); }
/// <summary> /// 发送数据 /// </summary> /// <param name="packet">网络数据包</param> public IAwait Send(object packet) { Exception ex; var data = packer.Encode(packet, out ex); if (ex != null) { OnSocketError(ex); throw ex; } return(Send(data)); }