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=========================================================================*/
20#ifndef vtkClientSocket_h
21#define vtkClientSocket_h
22
23#include "vtkCommonSystemModule.h" // For export macro
24#include "vtkSocket.h"
25class vtkServerSocket;
26
27class VTKCOMMONSYSTEM_EXPORT vtkClientSocket : public vtkSocket
28{
29public:
31 vtkTypeMacro(vtkClientSocket, vtkSocket);
32 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
33
37 int ConnectToServer(const char* hostname, int port);
38
40
46 vtkGetMacro(ConnectingSide, bool);
48
49protected:
51 ~vtkClientSocket() VTK_OVERRIDE;
52
53 vtkSetMacro(ConnectingSide, bool);
54 bool ConnectingSide;
55 friend class vtkServerSocket;
56private:
57 vtkClientSocket(const vtkClientSocket&) VTK_DELETE_FUNCTION;
58 void operator=(const vtkClientSocket&) VTK_DELETE_FUNCTION;
59
60};
61
62
63#endif
64
Encapsulates a client socket.
int ConnectToServer(const char *hostname, int port)
Connects to host.
~vtkClientSocket() override
static vtkClientSocket * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:40
Encapsulate a socket that accepts connections.
BSD socket encapsulation.
Definition: vtkSocket.h:31
@ port
Definition: vtkX3D.h:447
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.