sipxportlib  Version 3.3
OsNatServerSocket.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 
12 #ifndef _OsNatServerSocket_h_
13 #define _OsNatServerSocket_h_
14 
15 // SYSTEM INCLUDES
16 //#include <...>
17 
18 // APPLICATION INCLUDES
19 #include <os/OsConnectionSocket.h>
20 #include <os/OsServerSocket.h>
21 
22 // DEFINES
23 // MACROS
24 // EXTERNAL FUNCTIONS
25 // EXTERNAL VARIABLES
26 // CONSTANTS
27 // STRUCTS
28 // TYPEDEFS
29 // FORWARD DECLARATIONS
30 
31 //: Implements TCP server for accepting TCP connections
32 // This class provides the implementation of the UDP datagram-based
33 // socket class which may be instantiated.
34 
36 {
37 /* //////////////////////////// PUBLIC //////////////////////////////////// */
38 public:
39 
40 /* ============================ CREATORS ================================== */
41 
42  OsNatServerSocket(int connectionQueueSize,
43  int serverPort=PORT_DEFAULT,
44  const char* szBindAddr = NULL,
45  const bool bPerformBind = true);
46 
47  //:Constructor to set up TCP socket server
48  // Sets the socket connection queue and starts listening on the
49  // port for requests to connect.
50  //
52  // connection requests which are allowed before subsequent requests
53  // are turned away.
55  // accept connection requests. PORT_DEFAULT means let OS pick port.
56 
58  //:Assignment operator
59 
60  virtual
62  //:Destructor
63 
64 
65 /* ============================ MANIPULATORS ============================== */
66 
67 /* ============================ ACCESSORS ================================= */
68 
69 /* ============================ INQUIRY =================================== */
70 
71 /* //////////////////////////// PROTECTED ///////////////////////////////// */
72 protected:
73  virtual OsConnectionSocket* createConnectionSocket(UtlString localIp, int descriptor);
74 
75 
76 /* //////////////////////////// PRIVATE /////////////////////////////////// */
77 private:
78  OsNatServerSocket(const OsServerSocket& rOsServerSocket);
79  //:Disable copy constructor
80 
82  //:Disable default constructor
83 
84 
85 };
86 
87 /* ============================ INLINE METHODS ============================ */
88 
89 #endif // _OsNatServerSocket_h_
OsNatServerSocket & operator=(const OsServerSocket &rhs)
param: connectionQueueSize - The maximum number of outstanding
virtual OsConnectionSocket * createConnectionSocket(UtlString localIp, int descriptor)
returns: 1 if one or call to accept() will not block returns: 0 if no connections are ready (i...
Definition: OsNatServerSocket.cpp:49
virtual ~OsNatServerSocket()
Definition: OsNatServerSocket.cpp:39
#define NULL
Definition: UtlDefs.h:29
Definition: UtlString.h:48
Definition: OsConnectionSocket.h:34
Definition: OsNatServerSocket.h:35
Definition: OsServerSocket.h:38
#define PORT_DEFAULT
Definition: OsDefs.h:180