Function ConnectedSocket.send

Send data on the connection. If the socket is blocking and there is no buffer space left, send waits, non-blocking socket returns 0 in this case.

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

Parameters

NameDescription
buf Data to be sent.
flags Flags.

Returns

The number of bytes actually sent.

Throws

SocketException if unable to send.