#include <userversocket.h>
Public Member Functions | |
| userversocket (const std::string &filename, time_t delay=0, int nconnections=5) | |
| Constructor. | |
| ~userversocket () | |
| Destructor. | |
| Util::ref< usocket > | accept (time_t delay=0, size_t bufsz=1024) |
| Accept a client connection. | |
| std::string | filename () const |
| Filename of underlying unix socket. | |
| time_t | delay () const |
| Max delay in millisecs that accept will wait before failing. | |
| int | fd () const |
| File descriptor of unix socket. | |
| bool | status () const |
| Return whether server is ok. | |
| operator bool () const | |
| Return whether server is ok. | |
| int | error () const |
| Return error code, 0 == ok. | |
| std::string | strerror () const |
| Return status string. | |
Private Member Functions | |
| userversocket (const userversocket &) | |
| userversocket & | operator= (const userversocket &) |
Private Attributes | |
| std::string | fn_ |
| int | fd_ |
| int | errno_ |
| time_t | delay_ |
Definition at line 16 of file userversocket.h.
|
||||||||||||||||
|
Constructor.
|
|
|
Destructor.
|
|
|
|
|
||||||||||||
|
Accept a client connection.
ref<usocket> client(server.accept());
if (*client) {
// all is well
}
|
|
|
Filename of underlying unix socket. Definition at line 45 of file userversocket.h. References fn_. |
|
|
Max delay in millisecs that accept will wait before failing. Definition at line 47 of file userversocket.h. References delay_. |
|
|
File descriptor of unix socket. Definition at line 49 of file userversocket.h. References fd_. |
|
|
Return whether server is ok. Definition at line 51 of file userversocket.h. References errno_. Referenced by operator bool(). |
|
|
Return whether server is ok. Definition at line 53 of file userversocket.h. References status(). |
|
|
Return error code, 0 == ok. Definition at line 55 of file userversocket.h. References errno_. |
|
|
Return status string.
|
|
|
|
|
|
Definition at line 62 of file userversocket.h. Referenced by filename(). |
|
|
Definition at line 63 of file userversocket.h. Referenced by fd(). |
|
|
Definition at line 64 of file userversocket.h. |
|
|
Definition at line 65 of file userversocket.h. Referenced by delay(). |
| dvnet-0.9.11 | [27 December, 2004] |