IBR-DTNSuite  0.8
ibrcommon::vsocket Class Reference

#include <vsocket.h>

Inheritance diagram for ibrcommon::vsocket:
Collaboration diagram for ibrcommon::vsocket:

List of all members.

Classes

class  vbind

Public Types

enum  Option {
  VSOCKET_REUSEADDR = 1 << 0, VSOCKET_LINGER = 1 << 1, VSOCKET_NODELAY = 1 << 2, VSOCKET_BROADCAST = 1 << 3,
  VSOCKET_NONBLOCKING = 1 << 4, VSOCKET_MULTICAST = 1 << 5, VSOCKET_MULTICAST_V6 = 1 << 6
}

Public Member Functions

 vsocket ()
virtual ~vsocket ()
int bind (const vaddress &address, const int port, unsigned int socktype=SOCK_STREAM)
void bind (const vinterface &iface, const int port, unsigned int socktype=SOCK_STREAM)
int bind (const int port, unsigned int socktype=SOCK_STREAM)
int bind (const ibrcommon::File &file, unsigned int socktype=SOCK_STREAM)
void unbind (const vaddress &address, const int port)
void unbind (const vinterface &iface, const int port)
void unbind (const int port)
void unbind (const ibrcommon::File &file)
void add (const int fd)
const std::list< int > get (const ibrcommon::vinterface &iface, const ibrcommon::vaddress::Family f=vaddress::VADDRESS_UNSPEC)
const std::list< int > get (const ibrcommon::vaddress::Family f=vaddress::VADDRESS_UNSPEC)
void listen (int connections)
void relisten ()
void set (const Option &o)
void unset (const Option &o)
void close ()
void shutdown ()
int fd ()
void select (std::list< int > &fds, struct timeval *tv=NULL)
int sendto (const void *buf, size_t n, const ibrcommon::vaddress &address, const unsigned int port)
void eventNotify (const LinkManagerEvent &evt)
void setEventCallback (ibrcommon::LinkManager::EventCallback *cb)

Static Public Member Functions

static void set_non_blocking (int socket, bool nonblock=true)

Detailed Description

Definition at line 57 of file vsocket.h.


Member Enumeration Documentation

Enumerator:
VSOCKET_REUSEADDR 
VSOCKET_LINGER 
VSOCKET_NODELAY 
VSOCKET_BROADCAST 
VSOCKET_NONBLOCKING 
VSOCKET_MULTICAST 
VSOCKET_MULTICAST_V6 

Definition at line 60 of file vsocket.h.


Constructor & Destructor Documentation

Definition at line 84 of file vsocket.cpp.

References IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, and set_non_blocking().

Here is the call graph for this function:

Definition at line 99 of file vsocket.cpp.

References close(), ibrcommon::LinkManager::getInstance(), and ibrcommon::LinkManager::unregisterAllEvents().

Here is the call graph for this function:


Member Function Documentation

void ibrcommon::vsocket::add ( const int  fd)

Definition at line 229 of file vsocket.cpp.

References bind().

Referenced by dtn::net::FileMonitor::componentUp(), and ibrcommon::NetLinkManager::run().

Here is the call graph for this function:

void ibrcommon::vsocket::bind ( const vinterface iface,
const int  port,
unsigned int  socktype = SOCK_STREAM 
)
int ibrcommon::vsocket::bind ( const int  port,
unsigned int  socktype = SOCK_STREAM 
)

Definition at line 181 of file vsocket.cpp.

References bind().

Here is the call graph for this function:

int ibrcommon::vsocket::bind ( const ibrcommon::File file,
unsigned int  socktype = SOCK_STREAM 
)

Definition at line 199 of file vsocket.cpp.

References bind().

Here is the call graph for this function:

Definition at line 309 of file vsocket.cpp.

Referenced by ibrcommon::UnicastSocketLowpan::bind().

Definition at line 358 of file vsocket.cpp.

References bind(), and ibrcommon::vaddress::VADDRESS_UNSPEC.

Referenced by ibrcommon::udpsocket::send().

Here is the call graph for this function:

Definition at line 376 of file vsocket.cpp.

References bind(), and ibrcommon::vaddress::VADDRESS_UNSPEC.

Here is the call graph for this function:

void ibrcommon::vsocket::listen ( int  connections)

Definition at line 235 of file vsocket.cpp.

References bind().

Referenced by ibrcommon::tcpserver::bind(), ibrcommon::tcpserver::listen(), and relisten().

Here is the call graph for this function:

Definition at line 248 of file vsocket.cpp.

References listen().

Referenced by select().

Here is the call graph for this function:

int ibrcommon::vsocket::sendto ( const void *  buf,
size_t  n,
const ibrcommon::vaddress address,
const unsigned int  port 
)
void ibrcommon::vsocket::set ( const Option o)

Definition at line 254 of file vsocket.cpp.

References bind().

Referenced by ibrcommon::tcpserver::bind(), and dtn::net::IPNDAgent::IPNDAgent().

Here is the call graph for this function:

void ibrcommon::vsocket::set_non_blocking ( int  socket,
bool  nonblock = true 
) [static]

Definition at line 296 of file vsocket.cpp.

References bind().

Referenced by dtn::net::IPNDAgent::componentDown(), and ibrcommon::tcpserver::shutdown().

Here is the call graph for this function:

void ibrcommon::vsocket::unbind ( const vaddress address,
const int  port 
)

Definition at line 205 of file vsocket.cpp.

References ibrcommon::Queue< T >::push().

Referenced by eventNotify(), and unbind().

Here is the call graph for this function:

void ibrcommon::vsocket::unbind ( const vinterface iface,
const int  port 
)
void ibrcommon::vsocket::unbind ( const int  port)

Definition at line 187 of file vsocket.cpp.

References unbind().

Here is the call graph for this function:

Definition at line 217 of file vsocket.cpp.

References ibrcommon::Queue< T >::push().

Here is the call graph for this function:

void ibrcommon::vsocket::unset ( const Option o)

Definition at line 268 of file vsocket.cpp.

References bind().

Here is the call graph for this function:


The documentation for this class was generated from the following files: