public async Task SendPacket(byte[] packet, CancellationToken cancelationToken)
        {
            var messageSequenceNumber = _messageSequenceNumber++;

            Log.Debug($"Sending message with seq_no {messageSequenceNumber}");
            var tcpMessage     = new TcpMessage(messageSequenceNumber, packet);
            var encodedMessage = tcpMessage.Encode();
            await TcpService.Send(encodedMessage, cancelationToken).ConfigureAwait(false);
        }
Exemplo n.º 2
0
        private async Task SendPacket(byte[] packet)
        {
            var mesSeqNo = _messageSeqNo++;

            Log.Debug($"Send message with seq_no {mesSeqNo}");

            var tcpMessage     = new TcpMessage(mesSeqNo, packet);
            var encodedMessage = tcpMessage.Encode();
            await TcpService.Send(encodedMessage).ConfigureAwait(false);
        }