VTK  9.1.0
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
28class vtkClientSocket;
29class VTKCOMMONSYSTEM_EXPORT vtkServerSocket : public vtkSocket
30{
31public:
33 vtkTypeMacro(vtkServerSocket, vtkSocket);
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
41
47 vtkClientSocket* WaitForConnection(unsigned long msec = 0);
48
53
54protected:
56 ~vtkServerSocket() override;
57
58private:
59 vtkServerSocket(const vtkServerSocket&) = delete;
60 void operator=(const vtkServerSocket&) = delete;
61};
62
63#endif
Encapsulates a client socket.
a simple class to control print indentation
Definition: vtkIndent.h:113
Encapsulate a socket that accepts connections.
int GetServerPort()
Returns the port on which the server is running.
static vtkServerSocket * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkClientSocket * WaitForConnection(unsigned long msec=0)
Waits for a connection.
int CreateServer(int port)
Creates a server socket at a given port and binds to it.
~vtkServerSocket() override
BSD socket encapsulation.
Definition: vtkSocket.h:31
@ port
Definition: vtkX3D.h:453