VTK
vtkClientSocket.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkClientSocket.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 =========================================================================*/
19 #ifndef __vtkClientSocket_h
20 #define __vtkClientSocket_h
21 
22 #include "vtkSocket.h"
23 class vtkServerSocket;
24 
26 {
27 public:
28  static vtkClientSocket* New();
29  vtkTypeMacro(vtkClientSocket, vtkSocket);
30  void PrintSelf(ostream& os, vtkIndent indent);
31 
33  int ConnectToServer(const char* hostname, int port);
34 
36 
40  vtkGetMacro(ConnectingSide, bool);
42 
43 //BTX
44 protected:
46  ~vtkClientSocket();
47 
48  vtkSetMacro(ConnectingSide, bool);
49  bool ConnectingSide;
50  friend class vtkServerSocket;
51 private:
52  vtkClientSocket(const vtkClientSocket&); // Not implemented.
53  void operator=(const vtkClientSocket&); // Not implemented.
54 //ETX
55 };
56 
57 
58 #endif
59 
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.