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 "vtkCommonSystemModule.h" // For export macro
23 #include "vtkSocket.h"
24 class vtkServerSocket;
25 
27 {
28 public:
29  static vtkClientSocket* New();
30  vtkTypeMacro(vtkClientSocket, vtkSocket);
31  void PrintSelf(ostream& os, vtkIndent indent);
32 
34  int ConnectToServer(const char* hostname, int port);
35 
37 
41  vtkGetMacro(ConnectingSide, bool);
43 
44 //BTX
45 protected:
47  ~vtkClientSocket();
48 
49  vtkSetMacro(ConnectingSide, bool);
50  bool ConnectingSide;
51  friend class vtkServerSocket;
52 private:
53  vtkClientSocket(const vtkClientSocket&); // Not implemented.
54  void operator=(const vtkClientSocket&); // Not implemented.
55 //ETX
56 };
57 
58 
59 #endif
60 
Encapsulate a socket that accepts connections.
#define VTKCOMMONSYSTEM_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)
BSD socket encapsulation.
Definition: vtkSocket.h:29
static vtkObject * New()
Encapsulates a client socket.