send(2) wrapper. Equivalent to send(m_socket, data, len, flags);. Code that uses this wrapper can be unit tested if this method is overridden by a mock Sock implementation.
Declared in <util/sock.h>
[[nodiscard]]
virtual
ssize_t
Send(
void const* data,
size_t len,
int flags) const;
Number of bytes sent, or -1 on error (with errno set).
The return value should not be discarded.
| Name | Description |
|---|---|
| data | Pointer to the bytes to send. |
| len | Number of bytes to send. |
| flags | Flags passed through to send(2). |