Function ConnectedSocket.receive
Receive data on the connection.
long receive
(
ubyte[] buf,
BitFlags!(tanya.network.socket.ConnectionOrientedSocket.Flag) flags = BitFlags(0) .this(cast(Flag)0)
) @nogc @trusted;
Parameters
Name | Description |
---|---|
buf | Buffer to save received data. |
flags | Flags. |
Returns
The number of bytes received or 0 if nothing received because the call would block.
Throws
SocketException if unable to receive.