summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2015-01-07 10:16:13 -0330
committerDwayne Boone <dwayne@zeroc.com>2015-01-07 10:16:13 -0330
commit25dc1ddfb828aa892afdf399c835c8a150a8cff3 (patch)
tree1c0ba31f16ad41aadcdccddbc4fc803396004709 /java/src
parentICE-6253 added tests to ensure Functional_TwowayCallback* used (diff)
downloadice-25dc1ddfb828aa892afdf399c835c8a150a8cff3.tar.bz2
ice-25dc1ddfb828aa892afdf399c835c8a150a8cff3.tar.xz
ice-25dc1ddfb828aa892afdf399c835c8a150a8cff3.zip
ICE-6082 added sndBufSize and rcvBufSize to UDPEndpointInfo
Diffstat (limited to 'java/src')
-rw-r--r--java/src/Ice/src/main/java/IceInternal/UdpEndpointI.java27
-rw-r--r--java/src/Ice/src/main/java/IceInternal/UdpTransceiver.java15
2 files changed, 35 insertions, 7 deletions
diff --git a/java/src/Ice/src/main/java/IceInternal/UdpEndpointI.java b/java/src/Ice/src/main/java/IceInternal/UdpEndpointI.java
index 834d4eca127..680cd031626 100644
--- a/java/src/Ice/src/main/java/IceInternal/UdpEndpointI.java
+++ b/java/src/Ice/src/main/java/IceInternal/UdpEndpointI.java
@@ -12,11 +12,14 @@ package IceInternal;
final class UdpEndpointI extends IPEndpointI
{
public UdpEndpointI(ProtocolInstance instance, String ho, int po, java.net.InetSocketAddress sourceAddr,
- String mcastInterface, int mttl, boolean conn, String conId, boolean co)
+ String mcastInterface, int mttl, int sndBufSize, int rcvBufSize, boolean conn, String conId,
+ boolean co)
{
super(instance, ho, po, sourceAddr, conId);
_mcastInterface = mcastInterface;
_mcastTtl = mttl;
+ _sndBufSize = sndBufSize;
+ _rcvBufSize = rcvBufSize;
_connect = conn;
_compress = co;
}
@@ -120,8 +123,8 @@ final class UdpEndpointI extends IPEndpointI
}
else
{
- return new UdpEndpointI(_instance, _host, _port, _sourceAddr, _mcastInterface, _mcastTtl, _connect,
- _connectionId, compress);
+ return new UdpEndpointI(_instance, _host, _port, _sourceAddr, _mcastInterface, _mcastTtl, _sndBufSize,
+ _rcvBufSize, _connect, _connectionId, compress);
}
}
@@ -165,8 +168,14 @@ final class UdpEndpointI extends IPEndpointI
public UdpEndpointI endpoint(UdpTransceiver transceiver)
{
- return new UdpEndpointI(_instance, _host, transceiver.effectivePort(), _sourceAddr, _mcastInterface,_mcastTtl,
- _connect, _connectionId, _compress);
+ return new UdpEndpointI(_instance, _host, transceiver.effectivePort(), _sourceAddr, _mcastInterface, _mcastTtl,
+ transceiver.sndBufSize(), transceiver.rcvBufSize(), _connect, _connectionId, _compress);
+ }
+
+ public void setBufSize(int sndSize, int rcvSize)
+ {
+ _sndBufSize = sndSize;
+ _rcvBufSize = rcvSize;
}
//
@@ -296,6 +305,8 @@ final class UdpEndpointI extends IPEndpointI
udpInfo.compress = _compress;
udpInfo.mcastInterface = _mcastInterface;
udpInfo.mcastTtl = _mcastTtl;
+ udpInfo.sndBufSize = _sndBufSize;
+ udpInfo.rcvBufSize = _rcvBufSize;
}
}
@@ -396,12 +407,14 @@ final class UdpEndpointI extends IPEndpointI
@Override
protected IPEndpointI createEndpoint(String host, int port, String connectionId)
{
- return new UdpEndpointI(_instance, host, port, _sourceAddr, _mcastInterface,_mcastTtl, _connect,
- connectionId, _compress);
+ return new UdpEndpointI(_instance, host, port, _sourceAddr, _mcastInterface,_mcastTtl, _sndBufSize, _rcvBufSize,
+ _connect, connectionId, _compress);
}
private String _mcastInterface = "";
private int _mcastTtl = -1;
+ private int _sndBufSize = -1;
+ private int _rcvBufSize = -1;
private boolean _connect;
private boolean _compress;
}
diff --git a/java/src/Ice/src/main/java/IceInternal/UdpTransceiver.java b/java/src/Ice/src/main/java/IceInternal/UdpTransceiver.java
index cead447dda2..bb9d7cd65d8 100644
--- a/java/src/Ice/src/main/java/IceInternal/UdpTransceiver.java
+++ b/java/src/Ice/src/main/java/IceInternal/UdpTransceiver.java
@@ -343,6 +343,16 @@ final class UdpTransceiver implements Transceiver
return _addr.getPort();
}
+ public final int sndBufSize()
+ {
+ return _sndSize;
+ }
+
+ public final int rcvBufSize()
+ {
+ return _rcvSize;
+ }
+
//
// Only for use by UdpEndpoint
//
@@ -469,6 +479,11 @@ final class UdpTransceiver implements Transceiver
}
}
}
+
+ if(_endpoint != null)
+ {
+ _endpoint.setBufSize(_sndSize, _rcvSize);
+ }
}
private void configureMulticast(java.net.InetSocketAddress group, String interfaceAddr, int ttl)