socket_receive (void* data, var size)
Receives data from a connected TCP or UDP network socket.
Parameters:
data - pointer to a buffer that is filled with the received data.
size - size of the buffer in bytes.
Returns:
Number of bytes received, or 0 when no data was received from the socket
since the last call.
Speed:
Slow
Remarks:
- The socket must be opened before through socket_connect.
- For permanently receiving data, poll the socket by calling socket_receive in a wait() loop.
- For displaying a received character string, make sure to add the \0 end mark.
Edition:
P
LC
A7.82
Example:
See socket_send
See also:
socket_send, socket_connect
► latest
version online