vtkMPIMToNSocketConnection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkMPIMToNSocketConnection.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
33 #ifndef vtkMPIMToNSocketConnection_h
34 #define vtkMPIMToNSocketConnection_h
35 
36 #include "vtkObject.h"
37 #include "vtkRemotingCoreModule.h" //needed for exports
39 class vtkServerSocket;
42 class vtkMPIMToNSocketConnectionInternals;
43 
45 {
46 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
51  void Initialize(int waiting_process_type);
52 
56  void ConnectMtoN();
57 
59 
62  void SetNumberOfConnections(int);
63  vtkGetMacro(NumberOfConnections, int);
65 
69  void SetPortInformation(unsigned int processNumber, int portNumber, const char* hostName);
70 
72 
75  vtkGetObjectMacro(SocketCommunicator, vtkSocketCommunicator);
77 
81  void GetPortInformation(vtkMPIMToNSocketConnectionPortInformation*);
82 
84 
87  vtkGetMacro(PortNumber, int);
89 
90 protected:
91  vtkSetMacro(PortNumber, int);
92 
97  void SetupWaitForConnection();
98 
103  void WaitForConnection();
104 
108  void Connect();
109 
110  virtual void SetController(vtkMultiProcessController*);
111  virtual void SetSocketCommunicator(vtkSocketCommunicator*);
113  ~vtkMPIMToNSocketConnection() override;
114 
115 private:
116  int PortNumber;
117  int Socket;
118  vtkServerSocket* ServerSocket;
119  int NumberOfConnections;
120  vtkMPIMToNSocketConnectionInternals* Internals;
121  vtkMultiProcessController* Controller;
122  vtkSocketCommunicator* SocketCommunicator;
124  void operator=(const vtkMPIMToNSocketConnection&) = delete;
125  bool IsWaiting;
126 };
127 
128 #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 &)