Sockets Toolkit - recvfrom
- Loadable Function:
[data, count, src_info] =
recvfrom(s, len)
- Loadable Function:
[data, count, src_info] =
recvfrom(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
recvfrom
.The read data is returned in the uint8 array data. The number of bytes read is returned in count and a structure with fields addr and port contain the source of the data.
You can get non-blocking operation by using the flag
MSG_DONTWAIT
which makes therecvfrom()
call return immediately. If there is no data, -1 is returned in count.See the
recvfrom
man pages for further details.