Brew MP 1.0.2
This functions reads data from UDP socket and records the IP address and port
of the sender if non-NULL. This function always returns immediately with the number
of bytes read. If no packets have arrived and the socket is still in a valid state,
ISOCKET_RecvFrom() returns AEE_NET_WOULDBLOCK. ISOCKET_Readable() may be used to
receive notification of when to try ISOCKET_RecvFrom() again.
Prior to performing any socket-specific behavior, ISOCKET_RecvFrom() performs
an ISOCKET_Realize() if neccesary.
Pointer to the ISocket Interface object.
Buffer to hold the received data.
Size of the buffer, in terms of number of bytes.
Data transport options.
Pointer to the IP Address in network byte order. May be NULL only if
not of interest to the application.
Pointer to the port in network byte order. May be NULL only if not
of interest to the application.
ISocket * pISocket,
INAddr * pa,
INPort * pwPort
- bytes_read: any positive number indicates the number of bytes that have been
successfully read into the provided buffer.
AEE_NET_WOULDBLOCK: if no data available now; try again later (See ISOCKET_Readable()).
AEE_NET_ERROR: if the socket is not in a valid state to receive data. The specific
error code can be retrieved by calling ISOCKET_GetLastError().