[#Sock-Listen] = xref:Sock.adoc[Sock]::Listen :relfileprefix: ../ :mrdocs: listen(2) wrapper. Equivalent to `listen(m_socket, backlog)`. 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 int Listen(int backlog) const; ---- == Return Value 0 on success, 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 | *backlog* | Maximum length of the queue of pending connections. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#