native socket_recv(_socket, _data, _length);
Array to save the data
Length of the array
- Receives data.
The amount of bytes than you end up receiving can be less than the one you expected.
This function will completely block the server until some data arrives to the given socket. Use this only if you are sure there is some data to be retrieved. You can do that by polling with socket_is_readable().
- Amount of bytes received 0 if the peer closed the connection -1 on failure