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

System.Net.Sockets.NetworkStream.DataAvailable Property

Gets a bool value indicating whether data is available to be read from the underlying socket buffer. [Edit]

public virtual bool DataAvailable { get; }

Value

true indicates that data is available to be read; false indicates that there is no data available to be read. [Edit]

Exceptions

TypeReason
ObjectDisposedExceptionThe current instance has been disposed. [Edit]

Remarks

This property is read-only.

Operation
As described above.

Accessing this property causes a call to the Socket.Available method of the underlying System.Net.Sockets.Socket instance. If the Available method returns a non-zero value, indicating data is available to be read, this property returns true; otherwise, this property returns false.

Note to Inheritors
Override this property to determine if data is available to be read in the underlying socket buffer.

[Edit]

Requirements

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