VTK
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) VTK_OVERRIDE;
35 
40  int CreateServer(int port);
41 
47  vtkClientSocket* WaitForConnection(unsigned long msec=0);
48 
52  int GetServerPort();
53 
54 protected:
56  ~vtkServerSocket() VTK_OVERRIDE;
57 
58 private:
59  vtkServerSocket(const vtkServerSocket&) VTK_DELETE_FUNCTION;
60  void operator=(const vtkServerSocket&) VTK_DELETE_FUNCTION;
61 };
62 
63 
64 #endif
65 
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Encapsulate a socket that accepts connections.
a simple class to control print indentation
Definition: vtkIndent.h:39
BSD socket encapsulation.
Definition: vtkSocket.h:30
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Encapsulates a client socket.