Discuss this help topic in SecureBlackbox Forum


TElSocket     See also     

Filter: C#/Java  VB.NET  Pascal  C++  PHP  

Sends UDP data to the destination address.


    int SendTo(byte[] Data, int Start, int Len, ref int Sent, string RemoteAddress, ushort RemotePort);

    Function SendTo(ByVal Data As Byte(), ByVal Start As Integer, ByVal Len As Integer, ByRef Sent As Integer, ByVal RemoteAddress As String, ByVal RemotePort As UInt16) As Integer

    function SendTo(Data : pointer; DataLen : integer; var Sent : integer; RemoteAddress : string; RemotePort : word) : integer;

    int32_t SendTo(void * Data, int32_t DataLen, int32_t &Sent, const std::string &RemoteAddress, uint16_t RemotePort);

    integer SendTo(TSBPointer|array of byte|string|NULL $Data, integer $DataLen, integer &$Sent, string $RemoteAddress, integer $RemotePort)


  • Data - buffer containing the data to be sent
  • Start - index of the first byte in the buffer of the data to be sent
  • DataLen (Len) - length of the data to be sent in bytes
  • Sent - specifiesthe number of bytes sent
  • RemoteAddress - address of the remote host
  • RemotePort - port on the remote host to which the connection is established
  • Len -

Return value

    Returns 0 on success or socket error code otherwise.
    In .NET, if an exception has been raised, -1 may be returned.


    Use this method to send UDP data packet to the destination address. Use address for broadcast delivery. Use AddToMulticastCli method if you need multicast delivery.

See also:     AddToMulticastCli     Send     CanSend     ReceiveFrom    

Discuss this help topic in SecureBlackbox Forum