cxxtools::net::UdpSender Class Reference

#include <cxxtools/net/udp.h>

Inheritance diagram for cxxtools::net::UdpSender:
cxxtools::net::Socket cxxtools::NonCopyable

Public Types

typedef size_t size_type

Public Member Functions

 UdpSender ()
 UdpSender (const std::string &ipaddr, unsigned short int port, bool bcast=false)
void connect (const std::string &ipaddr, unsigned short int port, bool bcast=false)
bool isConnected () const
size_type send (const void *message, size_type length, int flags=0) const
size_type send (const std::string &message, int flags=0) const
size_type recv (void *buffer, size_type length, int flags=0) const
std::string recv (size_type length, int flags=0) const
- Public Member Functions inherited from cxxtools::net::Socket
 Socket (int domain, int type, int protocol)
 A socket is created. On error a net::Exception is thrown.
 Socket (int fd=-1)
 A socket is initialized with a existing socket descriptor.
virtual ~Socket ()
 The socket is released.
bool good () const
 Returns true, if a socket is held.
bool bad () const
 Returns true, if no socket is held.
 operator bool () const
 Returns true, if a socket is held.
void create (int domain, int type, int protocol)
 Creates a new socket.
void close ()
 Closes the socket, if a socket is held.
int getFd () const
 Returns the socket handle.
std::string getSockAddr () const
 wrapper around getsockname(2)
void setTimeout (int t)
 Set timeout in milliseconds.
int getTimeout () const
 Returns timeout in milliseconds.
short poll (short events) const
 execute poll(2) - throws Timeout-exception, when no data available after timeout

Additional Inherited Members

- Protected Member Functions inherited from cxxtools::net::Socket
void setFd (int sockFd)

Member Typedef Documentation

Constructor & Destructor Documentation

cxxtools::net::UdpSender::UdpSender ( )
inline
cxxtools::net::UdpSender::UdpSender ( const std::string &  ipaddr,
unsigned short int  port,
bool  bcast = false 
)

Member Function Documentation

void cxxtools::net::UdpSender::connect ( const std::string &  ipaddr,
unsigned short int  port,
bool  bcast = false 
)
bool cxxtools::net::UdpSender::isConnected ( ) const
inline
size_type cxxtools::net::UdpSender::recv ( void *  buffer,
size_type  length,
int  flags = 0 
) const
std::string cxxtools::net::UdpSender::recv ( size_type  length,
int  flags = 0 
) const
size_type cxxtools::net::UdpSender::send ( const void *  message,
size_type  length,
int  flags = 0 
) const
size_type cxxtools::net::UdpSender::send ( const std::string &  message,
int  flags = 0 
) const

The documentation for this class was generated from the following file:
  • include/cxxtools/net/udp.h