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 "vtkSocket.h" 00025 00026 class vtkClientSocket; 00027 class VTK_COMMON_EXPORT vtkServerSocket : public vtkSocket 00028 { 00029 public: 00030 static vtkServerSocket* New(); 00031 vtkTypeMacro(vtkServerSocket, vtkSocket); 00032 void PrintSelf(ostream& os, vtkIndent indent); 00033 00036 int CreateServer(int port); 00037 00041 vtkClientSocket* WaitForConnection(unsigned long msec=0); 00042 00044 int GetServerPort(); 00045 protected: 00046 vtkServerSocket(); 00047 ~vtkServerSocket(); 00048 00049 private: 00050 vtkServerSocket(const vtkServerSocket&); // Not implemented. 00051 void operator=(const vtkServerSocket&); // Not implemented. 00052 }; 00053 00054 00055 #endif 00056