vtkMPIMToNSocketConnection.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkMPIMToNSocketConnection_h
22 #define vtkMPIMToNSocketConnection_h
23 
24 #include "vtkObject.h"
25 #include "vtkRemotingCoreModule.h" //needed for exports
27 class vtkServerSocket;
30 class vtkMPIMToNSocketConnectionInternals;
31 
33 {
34 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
39  void Initialize(int waiting_process_type);
40 
44  void ConnectMtoN();
45 
47 
50  void SetNumberOfConnections(int);
51  vtkGetMacro(NumberOfConnections, int);
53 
57  void SetPortInformation(unsigned int processNumber, int portNumber, const char* hostName);
58 
60 
63  vtkGetObjectMacro(SocketCommunicator, vtkSocketCommunicator);
65 
69  void GetPortInformation(vtkMPIMToNSocketConnectionPortInformation*);
70 
72 
75  vtkGetMacro(PortNumber, int);
77 
78 protected:
79  vtkSetMacro(PortNumber, int);
80 
85  void SetupWaitForConnection();
86 
91  void WaitForConnection();
92 
96  void Connect();
97 
98  virtual void SetController(vtkMultiProcessController*);
99  virtual void SetSocketCommunicator(vtkSocketCommunicator*);
101  ~vtkMPIMToNSocketConnection() override;
102 
103 private:
104  int PortNumber;
105  int Socket;
106  vtkServerSocket* ServerSocket;
107  int NumberOfConnections;
108  vtkMPIMToNSocketConnectionInternals* Internals;
109  vtkMultiProcessController* Controller;
110  vtkSocketCommunicator* SocketCommunicator;
112  void operator=(const vtkMPIMToNSocketConnection&) = delete;
113  bool IsWaiting;
114 };
115 
116 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
class to create socket connections between two servers
#define VTKREMOTINGCORE_EXPORT
static vtkObject * New()
void operator=(const vtkObjectBase &)