libutil++  1.9.3
 All Classes Functions Variables
TCPPort.h
1 /*
2 ** libutil++
3 ** $Id: TCPPort.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__TCPPort_H__
10 #define __libutilxx__sella__net__TCPPort_H__
11 
12 #include "../../common.h"
13 #include "Port.h"
14 #include "PortException.h"
15 
16 #include <sys/socket.h>
17 #include <stdint.h>
18 
19 #include <string>
20 
21 namespace sella {
22  namespace net {
23  class TCPPort;
24  }
25 }
26 
27 class sella::net::TCPPort : public Port {
28  public:
29  typedef std::shared_ptr<TCPPort> shared;
30  typedef TCPPort *ptr;
31 
32  public:
33  TCPPort(const std::string &service) throw (PortException);
34  TCPPort(uint16_t port = 0) throw (PortException);
35 
36  TCPPort(const TCPPort &other) throw ();
37  TCPPort(const TCPPort &&other) throw ();
38  virtual ~TCPPort() throw ();
39 
40  static const TCPPort::shared shared_ptr(const std::string &service) throw (PortException);
41  static const TCPPort::shared shared_ptr(uint16_t port = 0) throw (PortException);
42 };
43 
44 #endif
45 
46 /*
47 ** vim: noet ts=3 sw=3
48 */