vtkNetworkAccessManager.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkNetworkAccessManager.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 =========================================================================*/
24 #ifndef vtkNetworkAccessManager_h
25 #define vtkNetworkAccessManager_h
26 
27 #include "vtkObject.h"
28 #include "vtkRemotingCoreModule.h" //needed for exports
29 
31 
33 {
34 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
46  enum class ConnectionResult
47  {
48  CONNECTION_SUCCESS,
49  CONNECTION_TIMEOUT,
50  CONNECTION_ABORT,
51  CONNECTION_HANDSHAKE_ERROR,
52  CONNECTION_FAILURE
53  };
54 
56 
84  virtual vtkMultiProcessController* NewConnection(const char* url)
85  {
86  ConnectionResult result;
87  return this->NewConnection(url, result);
88  }
89  virtual vtkMultiProcessController* NewConnection(const char* url, ConnectionResult& result) = 0;
91 
96  virtual void AbortPendingConnection() = 0;
97 
101  virtual int ProcessEvents(unsigned long timeout_msecs) = 0;
102 
108  virtual bool GetNetworkEventsAvailable() = 0;
109 
113  virtual bool GetPendingConnectionsPresent() = 0;
114 
118  virtual void DisableFurtherConnections(int port, bool disable) = 0;
119 
123  virtual bool GetWrongConnectID() = 0;
124 
125 protected:
127  ~vtkNetworkAccessManager() override;
128 
129 private:
131  void operator=(const vtkNetworkAccessManager&) = delete;
132 };
133 
134 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
url
#define VTKREMOTINGCORE_EXPORT
virtual vtkMultiProcessController * NewConnection(const char *url)
Creates a new connection given the url.
port
vtkNetworkAccessManager is used to create new connections and monitor activity of those connections...
ConnectionResult
Possible result of connection when creating a new connection CONNECTION_SUCCESS: Connection was suces...