Command UDP_ReceiveFrom

4D Internet Commands

UDP_ReceiveFrom

version 11


UDP_ReceiveFrom (udp_ID; hostName; remotePort; text) Integer

ParameterTypeDescription
udp_IDLongintUDP socket reference
hostNameStringName or IP address of server(s) from which to receive text
Name or IP address of server that responds
remotePortIntegerRemote port to connect to (0=any)
textTextText received

Function result Integer Error code

Description

The UDP_ReceiveFrom command can be used to receive text that is sent via the udp_ID socket.

hostName is the name or IP address of the server(s) where the text will be received. (You can pass either a specific IP address or a broadcast address). This parameter then receives the name or IP address of the server that responds.

remotePort is the number of the port to be connected to. If you pass 0, any available port will be used.

The text received is returned in the text parameter.

See Also

UDP_ReceiveBLOBFrom, UDP_SendTo.