Mono Class Library: System.Net.Sockets.Socket Overview | Members

System.Net.Sockets.Socket.Send Method

Sends data to a connected socket. [Edit]

public int Send (byte[] buf)

Parameters

buf
A byte array containing data to send to the socket. [Edit]

Returns

A int containing the number of bytes sent. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionbuffer is null. [Edit]
InvalidOperationExceptionAn asynchronous call is pending and a blocking method has been called. [Edit]
System.Net.Sockets.SocketException

An error occurred while accessing the socket.

Note: For additional information on causes of the SocketException, see the System.Net.Sockets.SocketException class.

[Edit]
ObjectDisposedExceptionThe current instance has been disposed. [Edit]

Remarks

This method is equivalent to Socket.Send(Byte[], int, SocketFlags)(buffer, 0, buffer.Length, SocketFlags.None). [Edit]

Requirements

Namespace: System.Net.Sockets
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0