Sockets Toolkit - recv
- Loadable Function:
[data, count] =
recv(s, len)
- Loadable Function:
[data, count] =
recv(s, len, flags)
Read data from specified socket.
Requests reading len bytes from the socket s. The optional integer flags parameter can be used to modify the behaviour of
recv
.The read data is returned in the uint8 array data. The number of bytes read is returned in count.
You can get non-blocking operation by using the flag
MSG_DONTWAIT
which makes therecv()
call return immediately. If there is no data, -1 is returned in count.See the
recv
man pages for further details.