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 "vtkSocket.h"
25 
26 class vtkClientSocket;
28 {
29 public:
30  static vtkServerSocket* New();
31  vtkTypeMacro(vtkServerSocket, vtkSocket);
32  void PrintSelf(ostream& os, vtkIndent indent);
33 
36  int CreateServer(int port);
37 
41  vtkClientSocket* WaitForConnection(unsigned long msec=0);
42 
44 
45  int GetServerPort();
46 protected:
48  ~vtkServerSocket();
50 
51 private:
52  vtkServerSocket(const vtkServerSocket&); // Not implemented.
53  void operator=(const vtkServerSocket&); // Not implemented.
54 };
55 
56 
57 #endif
58 
Encapsulate a socket that accepts connections.
a simple class to control print indentation
Definition: vtkIndent.h:37
void PrintSelf(ostream &os, vtkIndent indent)
#define VTK_COMMON_EXPORT
BSD socket encapsulation.
Definition: vtkSocket.h:28
static vtkObject * New()
Encapsulates a client socket.