00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __libutilxx__sella__net__UDPSocket_H__
00010 #define __libutilxx__sella__net__UDPSocket_H__
00011
00012 #include "../../common.h"
00013 #include "Socket.h"
00014
00015 #include <sys/socket.h>
00016
00017 namespace sella {
00018 namespace net {
00019 class UDPSocket;
00020 }
00021 }
00022
00023 class sella::net::UDPSocket : public Socket {
00024 public:
00025 typedef std::shared_ptr<UDPSocket> shared;
00026 typedef UDPSocket *ptr;
00027
00028 public:
00029 UDPSocket(int family) throw (SocketException);
00030 UDPSocket(int family, const IPAddressPort &addressport) throw (SocketException);
00031 UDPSocket(int family, const IPAddress &address, const Port &port) throw (SocketException);
00032 UDPSocket(int family, const std::string &address, unsigned short port) throw (SocketException);
00033 UDPSocket(const IPAddressPort &addressport) throw (SocketException);
00034 UDPSocket(const IPAddress &address, const Port &port) throw (SocketException);
00035 UDPSocket(const UDPSocket &sock) = delete;
00036 virtual ~UDPSocket();
00037 void operator=(const UDPSocket &sock) = delete;
00038
00039 static const UDPSocket::shared shared_ptr(int family) throw (SocketException);
00040 static const UDPSocket::shared shared_ptr(int family, const IPAddressPort &addressport) throw (SocketException);
00041 static const UDPSocket::shared shared_ptr(int family, const IPAddress &address, const Port &port) throw (SocketException);
00042 static const UDPSocket::shared shared_ptr(int family, const std::string &address, unsigned short port) throw (SocketException);
00043 protected:
00044 private:
00045 };
00046
00047 #endif
00048
00049
00050
00051