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,
  BitFlags!(tanya.network.socket.ConnectionOrientedSocket.Flag) flags = BitFlags(0).this(cast(Flag)0)
) @nogc @trusted const;

Parameters

NameDescription
buf Data to be sent.
flags Flags.

Returns

The number of bytes actually sent.

Throws

SocketException if unable to send.