| | |
| | | } |
| | | tempPacket.FlagDateTime = System.DateTime.Now; |
| | | tempPacket.HaveSendCount++; |
| | | |
| | | byte [] messageSend; |
| | | //2020-01-14 增加本地通讯加密 |
| | | if (UserConfig.Instance.IsLocalEncrypt) { |
| | | var messageSend = Shared.Securitys.EncryptionService.AesEncryptPayload (tempPacket.Bytes, UserConfig.Instance.LocalEncryptKey); |
| | | tempPacket.Bytes = messageSend; |
| | | messageSend = Shared.Securitys.EncryptionService.AesEncryptPayload (tempPacket.Bytes, UserConfig.Instance.LocalEncryptKey); |
| | | } else { |
| | | messageSend = tempPacket.Bytes; |
| | | } |
| | | |
| | | busSocket.BeginSendTo(tempPacket.Bytes, 0, tempPacket.Bytes.Length, SocketFlags.None, tempPacket.RemoteEndPoint, new AsyncCallback(asyncEndSend), tempPacket); |
| | | busSocket.BeginSendTo(messageSend, 0, messageSend.Length, SocketFlags.None, tempPacket.RemoteEndPoint, new AsyncCallback(asyncEndSend), tempPacket); |
| | | } |
| | | catch { |
| | | |