Discuss this help topic in SecureBlackbox Forum

TElSocket.Receive

TElSocket     See also     


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


Receives TCP data from the connected socket.

Declaration

[C#]
    int Receive(ref byte[] Data, int DataLen, ref int Received);

[VB.NET]
    Function Receive(ByRef Data As Byte(), ByVal DataLen As Integer, ByRef Received As Integer) As Integer

[Pascal]
    function Receive(Data : pointer; DataLen : integer; var Received : integer) : integer;

[C++]
    int32_t Receive(void * Data, int32_t DataLen, int32_t &Received);

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

[Java]
    int receive(byte[][] Data, int DataLen, int[] Received);
    int receive(byte[] Data, int DataLen, TSBInteger Received);

Parameters

  • Data - the data to be received
  • DataLen - length of the data in bytes
  • Received - specifies howe much data has been received

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 property to receive TCP data from the connected socket. This operation is possible only when the socket is in issConnected state.

See also:     ReceiveFrom     Send     CanReceive    

Discuss this help topic in SecureBlackbox Forum