blob: e6349989550d7d8f0ad9fa119ae61af20e3f5aa8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
// **********************************************************************
//
// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#ifndef ICE_NETWORK_PROXY_H
#define ICE_NETWORK_PROXY_H
#include <Ice/Network.h>
namespace IceInternal
{
class ICE_API NetworkProxy : public virtual IceUtil::Shared
{
public:
//
// Write the connection request on the connection established
// with the network proxy server. This is called right after
// the connection establishment succeeds.
//
virtual void beginWrite(const Address&, Buffer&) = 0;
virtual SocketOperation endWrite(Buffer&) = 0;
//
// Once the connection request has been sent, this is called
// to prepare and read the response from the proxy server.
//
virtual void beginRead(Buffer&) = 0;
virtual SocketOperation endRead(Buffer&) = 0;
//
// This is called when the response from the proxy has been
// read. The proxy should copy the extra read data (if any) in the
// given byte vector.
//
virtual void finish(Buffer&, Buffer&) = 0;
//
// If the proxy host needs to be resolved, this should return
// a new NetworkProxy containing the IP address of the proxy.
// This is called from the endpoint host resolver thread, so
// it's safe if this this method blocks.
//
virtual NetworkProxyPtr resolveHost(ProtocolSupport) const = 0;
//
// Returns the IP address of the network proxy. This method
// must not block. It's only called on a network proxy object
// returned by resolveHost().
//
virtual Address getAddress() const = 0;
//
// Returns the name of the proxy, used for tracing purposes.
//
virtual std::string getName() const = 0;
//
// Returns the protocols supported by the proxy.
//
virtual ProtocolSupport getProtocolSupport() const = 0;
};
NetworkProxyPtr createNetworkProxy(const Ice::PropertiesPtr&, ProtocolSupport);
}
#endif
|