|
IBR-DTNSuite
0.10
|
#include <socket.h>


Public Member Functions | |
| fileserversocket (const File &file, int listen=0) | |
| virtual | ~fileserversocket () |
| virtual void | up () throw (socket_exception) |
| virtual void | down () throw (socket_exception) |
| virtual clientsocket * | accept (ibrcommon::vaddress &addr) throw (socket_exception) |
Public Member Functions inherited from ibrcommon::serversocket | |
| virtual | ~serversocket ()=0 |
| void | listen (int connections) throw (socket_exception) |
| void | set (SERVER_OPTION opt, bool val) |
Public Member Functions inherited from ibrcommon::basesocket | |
| virtual | ~basesocket ()=0 |
| virtual int | fd () const throw (socket_exception) |
| virtual int | release () throw (socket_exception) |
| void | close () throw (socket_exception) |
| void | shutdown (int how) throw (socket_exception) |
| bool | ready () const |
| sa_family_t | get_family () const throw (socket_exception) |
Additional Inherited Members | |
Public Types inherited from ibrcommon::serversocket | |
| enum | SERVER_OPTION { BLOCKING = 0 } |
Static Public Member Functions inherited from ibrcommon::basesocket | |
| static sa_family_t | get_family (int fd) throw (socket_exception) |
| static bool | hasSupport (const sa_family_t family, const int type=SOCK_DGRAM, const int protocol=0) throw () |
Static Public Attributes inherited from ibrcommon::basesocket | |
| static int | DEFAULT_SOCKET_FAMILY = AF_INET6 |
| static int | DEFAULT_SOCKET_FAMILY_ALTERNATIVE = AF_INET |
Protected Types inherited from ibrcommon::basesocket | |
| enum | socketstate { SOCKET_DOWN, SOCKET_UP, SOCKET_UNMANAGED, SOCKET_DESTROYED } |
Protected Member Functions inherited from ibrcommon::serversocket | |
| serversocket () | |
| serversocket (int fd) | |
| int | _accept_fd (ibrcommon::vaddress &addr) throw (socket_exception) |
Protected Attributes inherited from ibrcommon::basesocket | |
| socketstate | _state |
| int | _fd |
| sa_family_t | _family |
A fileserversocket is bound to a specific socket file waiting for incoming connections.
| ibrcommon::fileserversocket::fileserversocket | ( | const File & | file, |
| int | listen = 0 |
||
| ) |
Definition at line 539 of file socket.cpp.
|
virtual |
Definition at line 544 of file socket.cpp.
References down().

|
virtual |
Implements ibrcommon::serversocket.
Definition at line 584 of file socket.cpp.
|
virtual |
Close and destroy the file descriptor of this socket assignment.
| socket_exception | if the action has failed |
Implements ibrcommon::serversocket.
Definition at line 576 of file socket.cpp.
References ibrcommon::basesocket::_state, ibrcommon::basesocket::close(), ibrcommon::basesocket::SOCKET_DESTROYED, and ibrcommon::basesocket::SOCKET_DOWN.
Referenced by ~fileserversocket().

|
virtual |
Create the file descriptor for this socket and bind to the interface if necessary.
| socket_exception | if the action has failed |
Implements ibrcommon::serversocket.
Definition at line 551 of file socket.cpp.
References ibrcommon::basesocket::_fd, ibrcommon::basesocket::_state, ibrcommon::basesocket::close(), ibrcommon::basesocket::init_socket(), ibrcommon::serversocket::listen(), ibrcommon::basesocket::SOCKET_DOWN, and ibrcommon::basesocket::SOCKET_UP.
