Function ConnectedSocket.receive

Receive data on the connection.

long receive (
  ubyte[] buf,
  std.typecons.BitFlags!(dlib.network.socket.ConnectionOrientedSocket.Flag,0) flags = BitFlags(0).this(Flag.none)
) @trusted;

Parameters

NameDescription
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.