IBR-DTNSuite
0.12
|
#include <socket.h>
Public Member Functions | |
tcpsocket (int fd) | |
tcpsocket (const vaddress &destination, const timeval *timeout=NULL) | |
virtual | ~tcpsocket () |
virtual void | up () throw (socket_exception) |
virtual void | down () throw (socket_exception) |
Public Member Functions inherited from ibrcommon::clientsocket | |
virtual | ~clientsocket ()=0 |
ssize_t | send (const char *data, size_t len, int flags=0) throw (socket_exception) |
ssize_t | recv (char *data, size_t len, int flags=0) throw (socket_exception) |
void | set (CLIENT_OPTION opt, bool val) throw (socket_exception) |
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::clientsocket | |
enum | CLIENT_OPTION { NO_DELAY = 0, BLOCKING = 1 } |
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::clientsocket | |
clientsocket () | |
clientsocket (int fd) | |
Protected Attributes inherited from ibrcommon::basesocket | |
socketstate | _state |
int | _fd |
sa_family_t | _family |
ibrcommon::tcpsocket::tcpsocket | ( | int | fd) |
Definition at line 766 of file socket.cpp.
Referenced by up().
ibrcommon::tcpsocket::tcpsocket | ( | const vaddress & | destination, |
const timeval * | timeout = NULL |
||
) |
Definition at line 772 of file socket.cpp.
|
virtual |
Definition at line 782 of file socket.cpp.
References down().
|
virtual |
Close and destroy the file descriptor of this socket assignment.
socket_exception | if the action has failed |
Reimplemented from ibrcommon::clientsocket.
Definition at line 964 of file socket.cpp.
References ibrcommon::basesocket::_state, ibrcommon::basesocket::close(), ibrcommon::basesocket::SOCKET_DESTROYED, and ibrcommon::basesocket::SOCKET_DOWN.
Referenced by ~tcpsocket().
|
virtual |
Create the file descriptor for this socket and bind to the interface if necessary.
socket_exception | if the action has failed |
Reimplemented from ibrcommon::clientsocket.
Definition at line 789 of file socket.cpp.
References __close, __errno, ibrcommon::basesocket::_fd, ibrcommon::basesocket::_state, ibrcommon::vsocket::add(), ibrcommon::vaddress::address(), ibrcommon::basesocket::close(), ibrcommon::vsocket::destroy(), ibrcommon::basesocket::fd(), ibrcommon::basesocket::release(), ibrcommon::vsocket::remove(), ibrcommon::vsocket::select(), ibrcommon::vaddress::service(), ibrcommon::basesocket::set_blocking_mode(), ibrcommon::vsocket::size(), ibrcommon::basesocket::SOCKET_DOWN, ibrcommon::basesocket::SOCKET_UP, tcpsocket(), and ibrcommon::vsocket::up().
Referenced by dtn::net::TCPConnection::connect().