15 #ifndef SERVER_SOCKET_H
16 #define SERVER_SOCKET_H
40 typedef std::shared_ptr<ServerSocket>
Ptr;
60 static ServerSocket::Ptr open(std::shared_ptr<Address> theAddress,
int backlog = 128,
bool reuse =
false);
88 void listen(
int backlog = 128)
const;
Server Socket providing ability to bind, listen and accept connections.
std::thread acceptInNewThread(std::function< void(Socket::Ptr)> toCall)
static ServerSocket::Ptr open(std::shared_ptr< Address > theAddress, int backlog=128, bool reuse=false)
Socket::Ptr accept() const
static ServerSocket::Ptr create(std::shared_ptr< Address > theAddress)
void listen(int backlog=128) const
std::shared_ptr< ServerSocket > Ptr
ServerSocket(std::shared_ptr< Address > theAddress)
BSD Socket base class providing the basic, common functionality between ServerSockets and ClientSocke...
std::shared_ptr< Socket > Ptr
Namespace of the BsdSockets library.