SYNOPSIS
DESCRIPTION
This call works only on UDP sockets.
Receives data from a socket in the same way as rawio:read() would do. It additionally supports the passing of flags and returns the peer address where the received data has originated.
The optional flags parameter is not supported currently, and should be nil if passed at all.
Reads at most maxlen bytes of data from the socket. The default for maxlen is 4096 bytes. If the socket has a bigger packet pending, the remainder of the packet is discarded.
In non blocking mode, returns immediately if no data is available. In blocking mode, the call will wait for data to become available before it returns.
If the optional timeout value is given, the call will wait for this amount of milliseconds for data before it fails. This applies to both blocking and non-blocking mode.