summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/NetworkProxy.java
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-09-10 08:47:19 +0200
committerBenoit Foucher <benoit@zeroc.com>2014-09-10 08:47:19 +0200
commitb6c9d9a880f6f1a6908a3c62dfccdce3e68dad80 (patch)
treed3e9e9340064538a8dc7a645260d0eb3cdf55d63 /java/src/IceInternal/NetworkProxy.java
parentUndo bogus change from an earlier commit. (diff)
downloadice-b6c9d9a880f6f1a6908a3c62dfccdce3e68dad80.tar.bz2
ice-b6c9d9a880f6f1a6908a3c62dfccdce3e68dad80.tar.xz
ice-b6c9d9a880f6f1a6908a3c62dfccdce3e68dad80.zip
ICE-5582 (SOCKs test), ICE-5314 (HTTP proxies), major refactoring of networking code (addition of StreamSocket class abstraction)
Diffstat (limited to 'java/src/IceInternal/NetworkProxy.java')
-rw-r--r--java/src/IceInternal/NetworkProxy.java22
1 files changed, 17 insertions, 5 deletions
diff --git a/java/src/IceInternal/NetworkProxy.java b/java/src/IceInternal/NetworkProxy.java
index 4f7969d94ad..48932f18327 100644
--- a/java/src/IceInternal/NetworkProxy.java
+++ b/java/src/IceInternal/NetworkProxy.java
@@ -16,15 +16,22 @@ public interface NetworkProxy
// with the network proxy server. This is called right after
// the connection establishment succeeds.
//
- void beginWriteConnectRequest(java.net.InetSocketAddress endpoint, Buffer buf);
- void endWriteConnectRequest(Buffer buf);
+ void beginWrite(java.net.InetSocketAddress endpoint, Buffer buf);
+ int endWrite(Buffer buf);
//
// Once the connection request has been sent, this is called
// to prepare and read the response from the proxy server.
//
- void beginReadConnectRequestResponse(Buffer buf);
- void endReadConnectRequestResponse(Buffer buf);
+ void beginRead(Buffer buf);
+ int endRead(Buffer buf);
+
+ //
+ // 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.
+ //
+ void finish(Buffer readBuffer, Buffer writeBuffer);
//
// If the proxy host needs to be resolved, this should return
@@ -32,7 +39,7 @@ public interface NetworkProxy
// This is called from the endpoint host resolver thread, so
// it's safe if this this method blocks.
//
- NetworkProxy resolveHost();
+ NetworkProxy resolveHost(int protocolSupport);
//
// Returns the IP address of the network proxy. This method
@@ -45,4 +52,9 @@ public interface NetworkProxy
// Returns the name of the proxy, used for tracing purposes.
//
String getName();
+
+ //
+ // Returns the protocols supported by the proxy.
+ //
+ int getProtocolSupport();
}