1#ifndef NET_UnixStreamSocket_h__
2#define NET_UnixStreamSocket_h__
40 [[nodiscard]]
static std::pair<UnixStreamSocket, UnixStreamSocket>
59 [[nodiscard]] std::optional<UnixStreamSocket>
accept()
const;
70 [[nodiscard]] std::optional<UnixStreamSocket>
timedAccept(
int timeout)
const;
IOResult receiveAll(void *buffer, size_t len)
receive exactly the requested amount unless the peer disconnects
void listen(int backlog=128)
listen for incoming connections
IOResult sendAll(const void *buffer, size_t len)
send data through a connected socket
ConnectResult finishConnect(int timeout=0)
check if a previously started connected attempt is finished
UnixSocket(int type, int protocol)
allows a subclass to create new socket
UnixSocket(int type, int protocol)
allows a subclass to create new socket
static UnixStreamSocket adoptNativeHandle(int sockfd)
Take ownership of an existing native Unix stream socket descriptor.
std::optional< UnixStreamSocket > accept() const
static std::pair< UnixStreamSocket, UnixStreamSocket > createPair(bool nonBlocking=false)
std::optional< UnixStreamSocket > timedAccept(int timeout) const