socket_receive (void* data, var size)
Receives data from a connected TCP or UDP network socket.
data - pointer to a buffer that is filled with the received data.
size - size of the buffer in bytes.
Number of bytes received, or 0 when no data was received from the socket
since the last call.
- 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.