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

System.Net.Sockets.Socket.Available Property

Gets the amount of data available to be read in a single Socket.Receive(Byte[], int, SocketFlags) or Socket.ReceiveFrom(Byte[], int, int, SocketFlags, System.Net.EndPoint@) call. [Edit]

public int Available { get; }

Value

A int containing the number of bytes of data that are available to be read. [Edit]

Exceptions

TypeReason
System.Net.Sockets.SocketException
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 property is read-only.

When the current instance is stream-oriented (for example, the SocketType.Stream socket type), the available data is generally the total amount of data queued on the current instance.

When the current instance is message-oriented (for example, the SocketType.Dgram socket type), the available data is the first message in the input queue.

[Edit]

Requirements

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