VTK  9.4.20241222
vtkClientSocket.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
8#ifndef vtkClientSocket_h
9#define vtkClientSocket_h
10
11#include "vtkCommonSystemModule.h" // For export macro
12#include "vtkSocket.h"
13VTK_ABI_NAMESPACE_BEGIN
14class vtkServerSocket;
15
16class VTKCOMMONSYSTEM_EXPORT vtkClientSocket : public vtkSocket
17{
18public:
20 vtkTypeMacro(vtkClientSocket, vtkSocket);
21 void PrintSelf(ostream& os, vtkIndent indent) override;
22
26 int ConnectToServer(const char* hostname, int port);
27
29
35 vtkGetMacro(ConnectingSide, bool);
37
38protected:
40 ~vtkClientSocket() override;
41
42 vtkSetMacro(ConnectingSide, bool);
44 friend class vtkServerSocket;
45
46private:
47 vtkClientSocket(const vtkClientSocket&) = delete;
48 void operator=(const vtkClientSocket&) = delete;
49};
50
51VTK_ABI_NAMESPACE_END
52#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:108
Encapsulate a socket that accepts connections.
BSD socket encapsulation.
Definition vtkSocket.h:20