|
Util--
1.1
|
#include <utilmm/system/socket.hh>


Public Member Functions | |
| server_socket (Domain domain, Type type, std::string const &bind_to, int backlog=256) | |
| void | bind (std::string const &to) |
| socket * | accept () const |
| bool | try_wait () const |
| void | wait () const |
Public Member Functions inherited from utilmm::base_socket | |
| base_socket (int fd) | |
| base_socket (Domain domain, Type type) | |
| ~base_socket () | |
| int | fd () const |
| bool | try_wait (int what) const |
| void | wait (int what) const |
| void | flush () const |
Additional Inherited Members | |
Public Types inherited from utilmm::base_socket | |
| enum | Domain { Unix, Inet } |
| enum | Type { Stream, Datagram } |
| enum | Wait { WaitRead = 1, WaitWrite = 2, WaitException = 4 } |
Protected Member Functions inherited from utilmm::base_socket | |
| std::vector< uint8_t > | to_sockaddr (std::string const &to) const |
A socket class holding servers (i.e. listening sockets)
| utilmm::server_socket::server_socket | ( | Domain | domain, |
| Type | type, | ||
| std::string const & | bind_to, | ||
| int | backlog = 256 |
||
| ) |
| socket* utilmm::server_socket::accept | ( | ) | const |
Waits for an incoming connection If block is true, wait for a connection. If it is false, do not block and return NULL if there is no connection available
| void utilmm::server_socket::bind | ( | std::string const & | to | ) |
| bool utilmm::server_socket::try_wait | ( | ) | const |
Checks if there is an incoming connection in the connection queue.
| void utilmm::server_socket::wait | ( | ) | const |
Waits for an incoming connection
1.8.6