ParaView
vtkTCPNetworkAccessManager.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkTCPNetworkAccessManager.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 =========================================================================*/
23 #ifndef vtkTCPNetworkAccessManager_h
24 #define vtkTCPNetworkAccessManager_h
25 
27 #include "vtkPVClientServerCoreCoreModule.h" //needed for exports
28 
29 class vtkMultiProcessController;
30 
31 class VTKPVCLIENTSERVERCORECORE_EXPORT vtkTCPNetworkAccessManager : public vtkNetworkAccessManager
32 {
33 public:
34  static vtkTCPNetworkAccessManager* New();
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
74  virtual vtkMultiProcessController* NewConnection(const char* url);
75 
80  virtual void AbortPendingConnection();
81 
85  virtual int ProcessEvents(unsigned long timeout_msecs);
86 
92  virtual bool GetNetworkEventsAvailable();
93 
97  virtual bool GetPendingConnectionsPresent();
98 
99 protected:
102 
103  // used by GetPendingConnectionsPresent and ProcessEvents
104  int ProcessEventsInternal(unsigned long timeout_msecs, bool do_processing);
105 
109  vtkMultiProcessController* ConnectToRemote(
110  const char* hostname, int port, const char* handshake, int timeout_in_seconds);
111 
115  vtkMultiProcessController* WaitForConnection(
116  int port, bool once, const char* handshake, bool nonblocking);
117 
118  bool ParaViewHandshake(
119  vtkMultiProcessController* controller, bool server_side, const char* handshake);
120 
122 
123 private:
124  vtkTCPNetworkAccessManager(const vtkTCPNetworkAccessManager&) VTK_DELETE_FUNCTION;
125  void operator=(const vtkTCPNetworkAccessManager&) VTK_DELETE_FUNCTION;
126 
127  class vtkInternals;
128  vtkInternals* Internals;
129 };
130 
131 #endif
virtual bool GetNetworkEventsAvailable()=0
Peeks to check if any activity is available.
void PrintSelf(ostream &os, vtkIndent indent)
vtkTCPNetworkAccessManager is a concrete implementation of vtkNetworkAccessManager that uses tcp/ip s...
virtual int ProcessEvents(unsigned long timeout_msecs)=0
Process any network activity.
virtual bool GetPendingConnectionsPresent()=0
Returns true is the manager is currently waiting for any connections.
virtual vtkMultiProcessController * NewConnection(const char *url)=0
Creates a new connection given the url.
virtual void AbortPendingConnection()=0
Used to abort pending connection creation, if any.
vtkNetworkAccessManager is used to create new connections and monitor activity of those connections...