Function Socket.recvObj
recv whole object from a connected socket
Can be used on unconnected sockets as well, but then it is not possible to know who the sender was. This form of the call is intended for recieving object of absolute know size.
Parameters
Name | Description |
---|---|
data | pointer to data to be received. |
flags | flags ardument as defined for the standard socket recv |
timeout | timeout |
Throws
May throw an ErrnoException
in case of a socket error. If amount of bytes received is not identical to
sizeof(T)
, will throw ShortRead
excetpion, which inherits from ErrnoException
with errno
set to
EREMOTEIO
(remote IO error).
Will throw TimeoutExpired if the timeout expired