VTK
dox
Common
System
vtkServerSocket.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkServerSocket.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
22
#ifndef vtkServerSocket_h
23
#define vtkServerSocket_h
24
25
#include "vtkCommonSystemModule.h"
// For export macro
26
#include "
vtkSocket.h
"
27
28
class
vtkClientSocket
;
29
class
VTKCOMMONSYSTEM_EXPORT
vtkServerSocket
:
public
vtkSocket
30
{
31
public
:
32
static
vtkServerSocket
*
New
();
33
vtkTypeMacro(
vtkServerSocket
,
vtkSocket
);
34
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
35
40
int
CreateServer
(
int
port
);
41
47
vtkClientSocket
*
WaitForConnection
(
unsigned
long
msec=0);
48
52
int
GetServerPort
();
53
54
protected
:
55
vtkServerSocket
();
56
~vtkServerSocket
()
override
;
57
58
private
:
59
vtkServerSocket
(
const
vtkServerSocket
&) =
delete
;
60
void
operator=(
const
vtkServerSocket
&) =
delete
;
61
};
62
63
64
#endif
65
vtkServerSocket::CreateServer
int CreateServer(int port)
Creates a server socket at a given port and binds to it.
vtkServerSocket::~vtkServerSocket
~vtkServerSocket() override
vtkServerSocket::vtkServerSocket
vtkServerSocket()
vtkServerSocket::GetServerPort
int GetServerPort()
Returns the port on which the server is running.
vtkX3D::port
@ port
Definition:
vtkX3D.h:447
vtkServerSocket
Encapsulate a socket that accepts connections.
Definition:
vtkServerSocket.h:30
vtkServerSocket::WaitForConnection
vtkClientSocket * WaitForConnection(unsigned long msec=0)
Waits for a connection.
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:40
vtkServerSocket::New
static vtkServerSocket * New()
vtkServerSocket::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkClientSocket
Encapsulates a client socket.
Definition:
vtkClientSocket.h:28
vtkSocket
BSD socket encapsulation.
Definition:
vtkSocket.h:31
vtkSocket.h
Generated by
1.8.18