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 =========================================================================*/
21 #ifndef vtkServerSocket_h
22 #define vtkServerSocket_h
23 
24 #include "vtkCommonSystemModule.h" // For export macro
25 #include "vtkSocket.h"
26 
27 class vtkClientSocket;
29 {
30 public:
31  static vtkServerSocket* New();
32  vtkTypeMacro(vtkServerSocket, vtkSocket);
33  void PrintSelf(ostream& os, vtkIndent indent);
34 
37  int CreateServer(int port);
38 
42  vtkClientSocket* WaitForConnection(unsigned long msec=0);
43 
45 
46  int GetServerPort();
47 protected:
49  ~vtkServerSocket();
51 
52 private:
53  vtkServerSocket(const vtkServerSocket&); // Not implemented.
54  void operator=(const vtkServerSocket&); // Not implemented.
55 };
56 
57 
58 #endif
59 
Encapsulate a socket that accepts connections.
#define VTKCOMMONSYSTEM_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)
BSD socket encapsulation.
Definition: vtkSocket.h:29
static vtkObject * New()
Encapsulates a client socket.