4D Internet Commands v16

TCP_ReceiveBLOB

Home

 
4D Internet Commands v16
TCP_ReceiveBLOB

TCP_ReceiveBLOB 


 

TCP_ReceiveBLOB ( tcp_ID ; blobToReceive ) -> Funktionsergebnis 
Parameter Typ   Beschreibung
tcp_ID  Lange Ganzzahl in Reference to an open TCP session
blobToReceive  BLOB in BLOB to receive data
Funktionsergebnis  Ganzzahl in Error Code

Given a long integer reference to an established TCP session, the TCP_ReceiveBLOB command receives packets of data into blobToReceive.

This command performs the same action as TCP_Receive, except that it will receive data in a BLOB instead of a text, which allows bypassing the 32K text limitation. You can then receive binary objects.

tcp_ID is a long integer reference to an open TCP session as established with either the TCP_Open or TCP_Listen command.

blobToReceive is the BLOB which receives data. When receiving data via TCP packets, you cannot count on all of your data being received by a single TCP_ReceiveBLOB call. The TCP_ReceiveBLOB command is usually called within a Repeat...Until loop which continually checks on the status of the connection or is scanning for a known value.

This example shows the typical structure of a method using TCP_ReceiveBLOB:

 C_BLOB($Blob_Received;$Blob_All)
 C_LONGINT($srcpos;$dstpos)
 Repeat
    $Err:=TCP_ReceiveBLOB($TCP_ID;$Blob_Received )
    $Err:=TCP_State($TCP_ID;$State)
    $srcpos:=0
    $dstpos:=BLOB size($Blob_All)
  `Concatenating received Blobs
    COPY BLOB($Blob_Received;$Blob_All;$srcpos;$dstpos;BLOB size($Blob_Received))
 Until(($State=0)|($Err#0))



Siehe auch 

TCP_Listen
TCP_Open
TCP_Receive
TCP_SendBLOB

 
EIGENSCHAFTEN 

Produkt: 4D Internet Commands
Thema: IC TCP/IP
Nummer: 88887

 
GESCHICHTE 

Erstellt: 4D Internet Commands 6.7

 
ARTIKELVERWENDUNG

4D Internet Commands ( 4D Internet Commands v16)