IBR-DTNSuite
0.8
|
#include <udpsocket.h>
Classes | |
class | SocketException |
Public Member Functions | |
virtual | ~udpsocket () |
virtual void | shutdown () |
int | receive (char *data, size_t maxbuffer) |
int | receive (char *data, size_t maxbuffer, std::string &address, unsigned int &port) |
int | send (const ibrcommon::vaddress &address, const unsigned int port, const char *data, const size_t length) |
Protected Member Functions | |
udpsocket () throw (SocketException) | |
Protected Attributes | |
vsocket | _socket |
struct sockaddr_in | _sockaddr |
Definition at line 22 of file udpsocket.h.
ibrcommon::udpsocket::~udpsocket | ( | ) | [virtual] |
Definition at line 28 of file udpsocket.cpp.
References _socket, and ibrcommon::vsocket::close().
ibrcommon::udpsocket::udpsocket | ( | ) | throw (SocketException) [protected] |
Definition at line 24 of file udpsocket.cpp.
int ibrcommon::udpsocket::receive | ( | char * | data, |
size_t | maxbuffer | ||
) |
Definition at line 38 of file udpsocket.cpp.
References _socket, ibrcommon::recvfrom(), and ibrcommon::vsocket::select().
Referenced by dtn::net::UDPConvergenceLayer::operator>>().
int ibrcommon::udpsocket::receive | ( | char * | data, |
size_t | maxbuffer, | ||
std::string & | address, | ||
unsigned int & | port | ||
) |
Definition at line 51 of file udpsocket.cpp.
References _socket, ibrcommon::recvfrom(), and ibrcommon::vsocket::select().
int ibrcommon::udpsocket::send | ( | const ibrcommon::vaddress & | address, |
const unsigned int | port, | ||
const char * | data, | ||
const size_t | length | ||
) |
Definition at line 87 of file udpsocket.cpp.
References _socket, ibrcommon::vaddress::addrinfo(), ibrcommon::vsocket::get(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, ibrcommon::vaddress::isBroadcast(), ibrcommon::vaddress::isMulticast(), and ibrcommon::vaddress::toString().
Referenced by dtn::net::UDPConvergenceLayer::queue().
void ibrcommon::udpsocket::shutdown | ( | ) | [virtual] |
Reimplemented in dtn::net::UDPDatagramService.
Definition at line 33 of file udpsocket.cpp.
References _socket, and ibrcommon::vsocket::close().
Referenced by dtn::net::UDPConvergenceLayer::__cancellation().
struct sockaddr_in ibrcommon::udpsocket::_sockaddr [protected] |
Definition at line 44 of file udpsocket.h.
vsocket ibrcommon::udpsocket::_socket [protected] |
Definition at line 43 of file udpsocket.h.
Referenced by ibrcommon::UnicastSocket::bind(), dtn::net::UDPDatagramService::bind(), receive(), send(), shutdown(), and ~udpsocket().