4D Internet Commands v16

TCP_Receive

Home

 
4D Internet Commands v16
TCP_Receive

TCP_Receive 


 

TCP_Receive ( tcp_ID ; Text ) -> Funktionsergebnis 
Parameter Typ   Beschreibung
tcp_ID  Lange Ganzzahl in Reference to an open TCP session
Text  Text in Received Text
Funktionsergebnis  Ganzzahl in Error Code

Given a long integer reference to an established TCP Session, the TCP_Receive command receives packets of data into text.

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

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

 C_LONGINT($tcp_id)
 C_TEXT($webpage;$buffer)
 C_LONGINT(vState;$error)
 $webpage:=""
 vState:=0
 Repeat
    $error:=TCP_Receive($tcp_id;$buffer)
    $error:=TCP_State($tcp_id;vState)
    $webpage:=$webpage+$buffer
 Until((vState=0)|($error#0)) //until host closes connection or an error



Siehe auch 

TCP_Send
TCP_SendBLOB

 
EIGENSCHAFTEN 

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

 
GESCHICHTE 

Erstellt: 4D Internet Commands 6.5

 
ARTIKELVERWENDUNG

4D Internet Commands ( 4D Internet Commands v16)