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

System.Net.Sockets.Socket.ReceiveFrom Method

Receives data from a socket and, for connectionless protocols, stores the endpoint associated with the socket that sent the data.

public int ReceiveFrom (byte[] buf, ref System.Net.EndPoint remote_end)

Parameters

buf
Documentation for this section has not yet been entered.
remote_end
Documentation for this section has not yet been entered.

Returns

A int containing the number of bytes received.

Permissions

TypeReason
System.Net.SocketPermissionRequires permission to accept connections from the endpoint defined by remoteEP. See System.Net.NetworkAccess.Accept.

Exceptions

TypeReason
ArgumentNullExceptionbuffer or remoteEP is null.
InvalidOperationExceptionAn asynchronous call is pending and a blocking method has been called.
System.Net.Sockets.SocketException
Note: For additional information on causes of the SocketException, see the System.Net.Sockets.SocketException class.
ObjectDisposedExceptionThe current instance has been disposed.

Remarks

This method is equivalent to Socket.ReceiveFrom(Byte[], int, int, SocketFlags, System.Net.EndPoint@)(buffer, 0, buffer.Length, SocketFlags.None, remoteEP).

Requirements

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