[#Sock-Send] = xref:Sock.adoc[Sock]::Send :relfileprefix: ../ :mrdocs: 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. == Synopsis Declared in `<util/sock.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] virtual ssize_t Send( void const* data, size_t len, int flags) const; ---- == Return Value Number of bytes sent, or ‐1 on error (with errno set). [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *data* | Pointer to the bytes to send. | *len* | Number of bytes to send. | *flags* | Flags passed through to `send(2)`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#