VTK  9.1.0
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) override;
33
37 int ConnectToServer(const char* hostname, int port);
38
40
46 vtkGetMacro(ConnectingSide, bool);
48
49protected:
51 ~vtkClientSocket() override;
52
53 vtkSetMacro(ConnectingSide, bool);
55 friend class vtkServerSocket;
56
57private:
58 vtkClientSocket(const vtkClientSocket&) = delete;
59 void operator=(const vtkClientSocket&) = delete;
60};
61
62#endif
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:113
Encapsulate a socket that accepts connections.
BSD socket encapsulation.
Definition: vtkSocket.h:31
@ port
Definition: vtkX3D.h:453