simple question about ofxNetwork

one thing which is drivin me nuts, is how do I know how many bytes I’ve received with ofxUDPManager? UDP specs state that bytes 5,6 is the total size of the datagram (header+data), but I cannot access that through ofxUDPManager. when I call receive and pass it a buffer, how do I know how big the buffer should be? And if I use a standard size large buffer (like in the UDP Receiver example using 100,000byte buffer), how do I know how much data has been received?

ok, having read the documentation on recvfrom
http://www.opengroup.org/onlinepubs/007-…-vfrom.html

I found out that the function actually returns the number of bytes read! doh!

maybe the comments should be updated :wink:

/// Return values:
/// SOCKET_TIMEOUT indicates timeout
/// SOCKET_ERROR in case of a problem.
int ofxUDPManager::Receive(char* pBuff, const int iSize)