81 "unix_stream_server::setup: Socket already set up!",
false);
84 "unix_stream_server::setup: Path is NULL!",
91 "unix_stream_server::setup: Error at creating " 92 "UNIX stream server socket!");
104 setup(path.c_str(), flags);
113 return accept2(flags).release();
130 "unix_stream_server::accept2: Socket not has not yet been set up!",
false);
137 if (is_nonblocking && errno == EWOULDBLOCK)
138 return unique_ptr<unix_stream_client>(
nullptr);
141 "unix_stream_server::accept2: Error while " 142 "accepting new connection!");
Contains libsocket elements.
int accept_unix_stream_socket(int sfd, int flags)
Accept connections on a passive UNIX socket.
Provides an interface for working with UNIX STREAM sockets.
This class is instantiated and thrown when an error occurs. If there's an error somewhere in libsocke...
unix_stream_client * accept(int flags=0)
Accepts incoming connections on a UNIX domain stream server socket.
unique_ptr< unix_stream_client > accept2(int flags=0)
Accepts an incoming connection on a UNIX domain stream server socket and returns an owned pointer.
int sfd
sfd is the sockets API file descriptor
int create_unix_server_socket(const char *path, int socktype, int flags)
Create a passive UNIX socket.
unix_stream_server(void)
Void constructor.
void setup(const char *path, int flags=0)
Sets a server socket up.