VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkServerSocket.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00021 #ifndef __vtkServerSocket_h 00022 #define __vtkServerSocket_h 00023 00024 #include "vtkCommonSystemModule.h" // For export macro 00025 #include "vtkSocket.h" 00026 00027 class vtkClientSocket; 00028 class VTKCOMMONSYSTEM_EXPORT vtkServerSocket : public vtkSocket 00029 { 00030 public: 00031 static vtkServerSocket* New(); 00032 vtkTypeMacro(vtkServerSocket, vtkSocket); 00033 void PrintSelf(ostream& os, vtkIndent indent); 00034 00037 int CreateServer(int port); 00038 00042 vtkClientSocket* WaitForConnection(unsigned long msec=0); 00043 00045 00046 int GetServerPort(); 00047 protected: 00048 vtkServerSocket(); 00049 ~vtkServerSocket(); 00051 00052 private: 00053 vtkServerSocket(const vtkServerSocket&); // Not implemented. 00054 void operator=(const vtkServerSocket&); // Not implemented. 00055 }; 00056 00057 00058 #endif 00059