libutil++  1.9.3
 All Classes Functions Variables
UDPSocket.h
1 /*
2 ** libutil++
3 ** $Id: UDPSocket.h 1653 2016-02-28 19:54:59Z sella $
4 ** Copyright (c) 2011-2016 Digital Genesis, LLC. All Rights Reserved.
5 ** Released under the LGPL Version 2.1 License.
6 ** http://www.digitalgenesis.com
7 */
8 
9 #ifndef __libutilxx__sella__net__UDPSocket_H__
10 #define __libutilxx__sella__net__UDPSocket_H__
11 
12 #include "../../common.h"
13 #include "Socket.h"
14 
15 #include <sys/socket.h>
16 
17 namespace sella {
18  namespace net {
19  class UDPSocket;
20  }
21 }
22 
23 class sella::net::UDPSocket : public Socket {
24  public:
25  typedef std::shared_ptr<UDPSocket> shared;
26  typedef UDPSocket *ptr;
27 
28  public:
29  UDPSocket(int family) throw (SocketException);
30  UDPSocket(int family, const IPAddressPort &addressport) throw (SocketException);
31  UDPSocket(int family, const IPAddress &address, const Port &port) throw (SocketException);
32  UDPSocket(int family, const std::string &address, unsigned short port) throw (SocketException);
33  UDPSocket(const IPAddressPort &addressport) throw (SocketException);
34  UDPSocket(const IPAddress &address, const Port &port) throw (SocketException);
35  UDPSocket(const UDPSocket &sock) = delete;
36  virtual ~UDPSocket();
37  void operator=(const UDPSocket &sock) = delete;
38 
39  static const UDPSocket::shared shared_ptr(int family) throw (SocketException);
40  static const UDPSocket::shared shared_ptr(int family, const IPAddressPort &addressport) throw (SocketException);
41  static const UDPSocket::shared shared_ptr(int family, const IPAddress &address, const Port &port) throw (SocketException);
42  static const UDPSocket::shared shared_ptr(int family, const std::string &address, unsigned short port) throw (SocketException);
43  protected:
44  private:
45 };
46 
47 #endif
48 
49 /*
50 ** vim: noet ts=3 sw=3
51 */