UDT Reference: CUDT Methods |
The recvfile method receives data into a file stream.
int recvfile( const long long& offset,
const long long&
size |
Actual size of data received.
A CUDTException exception can be threw out if the UDT entity is not connected or the connection has been broken, or any file stream exception arises for ofs.
The recvfile method receives data into a file stream no matter the data is sent by send, sendfile, or in a mixed way.
recvfile is always in blocking mode. The UDT_RCVSYN option only affects recv.
Zero or negative value is allowed for size. In such situation, the method returns immediately.