Discuss this help topic in SecureBlackbox Forum

TElSocket.ReceiveFrom

TElSocket     See also     


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


Receives UDP data packet from the specified remote host.

Declaration

[C#/Java]
    int ReceiveFrom(ref byte[] Data, int DataLen, ref int Received, ref string RemoteAddress, ref ushort RemotePort);

[VB.NET]
    Function ReceiveFrom(ByRef Data As Byte(), ByVal DataLen As Integer, ByRef Received As Integer, ByRef RemoteAddress As String, ByRef RemotePort As UInt16) As Integer

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

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

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

Parameters

  • Data - the data to be received
  • DataLen - length of the data to be received in bytes
  • Received - specifies how much data has been received
  • RemoteAddress - address of the remote host
  • RemotePort - port on the remote host

Return value

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

Description

    Receives the UDP data packet from the specified remote host.

See also:     AddToMulticastSrv     Receive     CanReceive     SendTo    

Discuss this help topic in SecureBlackbox Forum