Renci.SshNet.Common.SshDataStream.WriteBinary C# (CSharp) Method

WriteBinary() public method

Writes a buffer preceded by its length into the SSH data stream.
is null.
public WriteBinary ( byte buffer ) : void
buffer byte The data to write.
return void
        public void WriteBinary(byte[] buffer)
        {
            if (buffer == null)
                throw new ArgumentNullException("buffer");

            WriteBinary(buffer, 0, buffer.Length);
        }

Same methods

SshDataStream::WriteBinary ( byte buffer, int offset, int count ) : void

Usage Example

コード例 #1
0
 public byte[] Build()
 {
     var sshDataStream = new SshDataStream(0);
     sshDataStream.WriteByte(KeyExchangeDhGroupExchangeReply.MessageNumber);
     sshDataStream.Write((uint)(4 + _hostKeyAlgorithm.Length + _hostKeys.Length));
     sshDataStream.Write((uint) _hostKeyAlgorithm.Length);
     sshDataStream.Write(_hostKeyAlgorithm, 0, _hostKeyAlgorithm.Length);
     sshDataStream.Write(_hostKeys, 0, _hostKeys.Length);
     sshDataStream.Write(_f);
     sshDataStream.WriteBinary(_signature);
     return sshDataStream.ToArray();
 }
All Usage Examples Of Renci.SshNet.Common.SshDataStream::WriteBinary