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

System.Net.Sockets.Socket.SendTo Method

Sends data to the socket associated with the specified endpoint. [Edit]

public int SendTo (byte[] buffer, System.Net.EndPoint remote_end)

Parameters

buffer
A byte array containing data to send to the socket. [Edit]
remote_end
Documentation for this section has not yet been entered. [Edit]

Returns

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

Permissions

TypeReason
System.Net.SocketPermission [Edit] Requires permission to make a connection to the endpoint defined by remoteEP. See System.Net.NetworkAccess.Connect.

Exceptions

TypeReason
ArgumentNullExceptionbuffer or remoteEP is null. [Edit]
InvalidOperationExceptionAn asynchronous call is pending and a blocking method has been called. [Edit]
System.Net.Sockets.SocketException
Note: For additional information on causes of the SocketException, see the System.Net.Sockets.SocketException class.
[Edit]
System.Security.SecurityExceptionA caller in the call stack does not have the required permissions. [Edit]
ObjectDisposedExceptionThe current instance has been disposed. [Edit]

Remarks

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

Requirements

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