Socket.Send Method (Byte[])

Sends all of the data currently in the buffer array to a bound socket.

Namespace: System.Net.Sockets
Assembly: System (in system.dll)


public int Send (
         byte[] buffer


  • buffer
    An array that contains the data to be sent.

Return Value

The number of bytes actually sent, if the call was successful; otherwise, -1.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also


Socket Class
Socket Members
System.Net.Sockets Namespace