00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef UDP_SOCKET_H
00015 #define UDP_SOCKET_H
00016
00017 #include "assa/Socket.h"
00018
00019 namespace ASSA {
00020
00028 class UDPSocket : public Socket {
00029 public:
00031 UDPSocket ()
00032 {
00033 trace("UDPSocket::UDPSocket()");
00034 }
00035
00039 UDPSocket (const int fd_)
00040 {
00041 trace("UDPSocket::UDPSocket(fd)");
00042 m_fd = fd_;
00043 }
00044
00046 virtual ~UDPSocket ()
00047 {
00048 trace("UDPSocket::~UDPSocket");
00049 }
00050
00058 bool open (const int domain_);
00059
00063 bool close ();
00064
00071 bool bind (const Address& my_address_);
00072
00074 const int getHandler() const { return m_fd; }
00075
00077 const int getDomain() const { return m_type; }
00078
00079 protected:
00081 void setHandler(const int fd_) { m_fd = fd_; }
00082
00084 void setDomain(const int type_) { m_type = type_; }
00085 };
00086
00087 }
00088
00089 #endif // UDP_SOCKET_H
00090
00091