Org.Mentalis.Security.Ssl.SecureSocket.Send C# (CSharp) Method

Send() public method

Sends data to a connected SecureSocket, starting at the indicated location in the data.
is a null reference (Nothing in Visual Basic). The specified size is zero. An operating system error occurs while accessing the SecureSocket. The SecureSocket has been closed. Unable to encrypt the data.
public Send ( byte buffer ) : int
buffer byte The data to be sent.
return int
		public override int Send(byte[] buffer) {
			if (buffer == null) 
				throw new ArgumentNullException();
			return this.Send(buffer, 0, buffer.Length, SocketFlags.None);
		}
		/// <summary>

Same methods

SecureSocket::Send ( byte buffer, SocketFlags socketFlags ) : int
SecureSocket::Send ( byte buffer, int size, SocketFlags socketFlags ) : int
SecureSocket::Send ( byte buffer, int offset, int size, SocketFlags socketFlags ) : int

Usage Example

Exemplo n.º 1
0
 /// <summary>
 /// Writes data to the stream.
 /// </summary>
 /// <param name="buffer">The data to write to the stream.</param>
 /// <param name="offset">The location in the buffer to start writing data from.</param>
 /// <param name="size">The number of bytes to write to the stream.</param>
 /// <exception cref="ArgumentNullException"><paramref name="buffer"/> is a null reference (<b>Nothing</b> in Visual Basic).</exception>
 /// <exception cref="ArgumentOutOfRangeException">The specified <paramref name="offset"/> or <paramref name="size"/> exceeds the size of <paramref name="buffer"/>.</exception>
 /// <exception cref="IOException">There is a failure while writing to the network.</exception>
 public override void Write(byte[] buffer, int offset, int size)
 {
     if (buffer == null)
     {
         throw new ArgumentNullException();
     }
     if (offset < 0 || offset > buffer.Length || size < 0 || size > buffer.Length - offset)
     {
         throw new ArgumentOutOfRangeException();
     }
     if (Socket == null)
     {
         throw new IOException();
     }
     Socket.Send(buffer, offset, size, SocketFlags.None);
 }
All Usage Examples Of Org.Mentalis.Security.Ssl.SecureSocket::Send