cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osaSocketServer.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5 
6  Author(s): Mark Finkelstein, Ali Uneri, Peter Kazanzides
7  Created on: 2009-08-17
8 
9  (C) Copyright 2007-2009 Johns Hopkins University (JHU), All Rights Reserved.
10 
11 --- begin cisst license - do not edit ---
12 
13 This software is provided "as is" under an open source license, with
14 no warranty. The complete license can be found in license.txt and
15 http://www.cisst.org/cisst/license.txt.
16 
17 --- end cisst license ---
18 */
19 
42 #ifndef _osaSocketServer_h
43 #define _osaSocketServer_h
44 
46 #include <cisstCommon/cmnLogger.h>
49 // always include last
51 
53 {
55 
56  public:
58  osaSocketServer(void);
59 
61  ~osaSocketServer(void);
62 
66  bool AssignPort(unsigned short port);
67 
70  bool Listen(int backlog = 5);
71 
74  osaSocket * Accept(void);
75 
77  void Close(void);
78 
79  protected:
80 
82 };
83 
85 
86 #endif // _osaSocketServer_h
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
Portability across compilers and operating systems tools.
int ServerSocketFD
Definition: osaSocketServer.h:81
Base class for high level objects.
Definition: cmnGenericObject.h:51
Definition: osaSocketServer.h:52
Class register definitions and log macros.
Declaration of cmnLogger amd macros for human readable logging.
CMN_DECLARE_SERVICES_INSTANTIATION(osaSocketServer)
Macros to export the symbols of cisstOSAbstraction (in a Dll).
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
Declaration of osaSocketThis is a cross-platform socket library with basic support for UDP (datagram)...
Definition: osaSocket.h:171
const int CMN_NO_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:328
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76