Send() public method

public Send ( byte data, int offset, int count ) : void
data byte
offset int
count int
return void
コード例 #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);
        }
コード例 #2
0
ファイル: AudioClient.cs プロジェクト: fossabot/WizBot
 public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => _client.Send(buffer, offset, count);
コード例 #3
0
 public override void Write(byte[] buffer, int offset, int count)
 {
     _client.Send(buffer, offset, count);
 }
コード例 #4
0
ファイル: VirtualClient.cs プロジェクト: awp-1/NewMortyBot
 public void Send(byte[] data, int offset, int count) => _client.Send(data, offset, count);