Send() public method

public Send ( byte data, int offset, int count ) : void
data byte
offset int
count int
return void
Exemplo n.º 1
0
        public override void Write(byte[] buffer, int offset, int count)
        {
            unchecked
            {
                if (_nonce[3]++ == byte.MaxValue)
                {
                    _nonce[2]++;
                }

                _timestamp += (uint)_samplesPerFrame;
                _nonce[4]   = (byte)(_timestamp >> 24);
                _nonce[5]   = (byte)(_timestamp >> 16);
                _nonce[6]   = (byte)(_timestamp >> 8);
                _nonce[7]   = (byte)(_timestamp >> 0);
            }

            count = SecretBox.Encrypt(buffer, offset, count, _buffer, 12, _nonce, _secretKey);
            Buffer.BlockCopy(_nonce, 0, _buffer, 0, 12); //Copy the RTP header from nonce to buffer
            _audioClient.Send(_buffer, count + 12);
        }
Exemplo n.º 2
0
 public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => _client.Send(buffer, offset, count);
Exemplo n.º 3
0
 public override void Write(byte[] buffer, int offset, int count)
 {
     _client.Send(buffer, offset, count);
 }
Exemplo n.º 4
0
 public void Send(byte[] data, int offset, int count) => _client.Send(data, offset, count);