Discuss this help topic in SecureBlackbox Forum

TElSocket.SendTo

TElSocket     See also     


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


Sends UDP data to the destination address.

Declaration

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

[VB.NET]
    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

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

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

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

[Java]
    int sendTo(byte[] Data, int Start, int Len, int[] Sent, String RemoteAddress, short arg5);
    int sendTo(byte[] Data, int Start, int Len, TSBInteger Sent, String RemoteAddress, short arg5);

Parameters

  • 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.

Description

    Use this method to send UDP data packet to the destination address. Use 255.255.255.255 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