cisst-saw
Toggle main menu visibility
Loading...
Searching...
No Matches
tmp
cisst-saw
cisst
cisstOSAbstraction
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
41
42
#ifndef _osaSocketServer_h
43
#define _osaSocketServer_h
44
45
#include <
cisstCommon/cmnClassRegister.h
>
46
#include <
cisstCommon/cmnLogger.h
>
47
#include <
cisstCommon/cmnPortability.h
>
48
#include <
cisstOSAbstraction/osaSocket.h
>
49
// always include last
50
#include <
cisstOSAbstraction/osaExport.h
>
51
52
class
CISST_EXPORT
osaSocketServer
:
public
cmnGenericObject
53
{
54
CMN_DECLARE_SERVICES(
CMN_NO_DYNAMIC_CREATION
,
CMN_LOG_ALLOW_DEFAULT
);
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
81
int
ServerSocketFD
;
82
};
83
84
CMN_DECLARE_SERVICES_INSTANTIATION
(
osaSocketServer
);
85
86
#endif
// _osaSocketServer_h
cmnGenericObject
Base class for high level objects.
Definition
cmnGenericObject.h:53
osaSocket
Definition
osaSocket.h:175
osaSocketServer
Definition
osaSocketServer.h:53
osaSocketServer::Accept
osaSocket * Accept(void)
Accept an incoming connection.
osaSocketServer::~osaSocketServer
~osaSocketServer(void)
Destructor.
osaSocketServer::Listen
bool Listen(int backlog=5)
Listen for incoming connections.
osaSocketServer::osaSocketServer
osaSocketServer(void)
Default constructor.
osaSocketServer::AssignPort
bool AssignPort(unsigned short port)
Set the port for receiving data.
osaSocketServer::Close
void Close(void)
Close the listening socket.
osaSocketServer::ServerSocketFD
int ServerSocketFD
Definition
osaSocketServer.h:81
cmnClassRegister.h
Class register definitions and log macros.
CMN_DECLARE_SERVICES_INSTANTIATION
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition
cmnClassRegisterMacros.h:199
CMN_NO_DYNAMIC_CREATION
const int CMN_NO_DYNAMIC_CREATION
Definition
cmnClassRegisterMacros.h:325
CISST_EXPORT
#define CISST_EXPORT
Definition
cmnExportMacros.h:50
CMN_LOG_ALLOW_DEFAULT
#define CMN_LOG_ALLOW_DEFAULT
Definition
cmnLogLoD.h:76
cmnLogger.h
Declaration of cmnLogger amd macros for human readable logging.
cmnPortability.h
Portability across compilers and operating systems tools.
osaExport.h
Macros to export the symbols of cisstOSAbstraction (in a Dll).
osaSocket.h
Declaration of osaSocket.
Generated by
1.18.0