VTK
dox/Common/vtkServerSocket.h
Go to the documentation of this file.
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 
00045   int GetServerPort();
00046 protected:
00047   vtkServerSocket();
00048   ~vtkServerSocket();
00050 
00051 private:
00052   vtkServerSocket(const vtkServerSocket&); // Not implemented.
00053   void operator=(const vtkServerSocket&); // Not implemented.
00054 };
00055 
00056 
00057 #endif
00058