libutil++  1.9.3
 All Classes Functions Variables
UDPPort.cpp
1 /*
2 ** libutil++
3 ** $Id: UDPPort.cpp 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 static const char rcsid[] __attribute__((used)) = "$Id: UDPPort.cpp 1653 2016-02-28 19:54:59Z sella $";
10 
11 #include "UDPPort.h"
12 #include "PortException.h"
13 
14 #include <sys/socket.h>
15 #include <stdint.h>
16 
17 #include <string>
18 
19 using namespace sella::net;
20 
21 UDPPort::UDPPort(const std::string &service) throw (PortException) :
22  Port(service, Port::UDPRequired)
23 { }
24 
25 UDPPort::UDPPort(uint16_t port) throw (PortException) :
26  Port(port, Port::UDPRequired)
27 { }
28 
29 UDPPort::UDPPort(const UDPPort &other) throw () :
30  Port(other)
31 { }
32 
33 UDPPort::UDPPort(const UDPPort &&other) throw () :
34  Port(other)
35 { }
36 
37 UDPPort::~UDPPort() throw () { }
38 
39 const UDPPort::shared UDPPort::shared_ptr(const std::string &service) throw (PortException) {
40  return std::make_shared<UDPPort>(service);
41 }
42 
43 const UDPPort::shared UDPPort::shared_ptr(uint16_t port) throw (PortException) {
44  return std::make_shared<UDPPort>(port);
45 }
46 
47 /*
48 ** vim: noet ts=3 sw=3
49 */