diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-05-28 13:47:20 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-05-28 13:47:20 +0000 |
commit | 1cf6107ab5f200b2a224acd711d572341ec1a22f (patch) | |
tree | 5545fdc8d560982fbf8b6bc3ae87a089bc1889cc /java/src/IceInternal/Network.java | |
parent | Remove Ice.UseEventLog property from head. Remove code in Glacier2 that (diff) | |
download | ice-1cf6107ab5f200b2a224acd711d572341ec1a22f.tar.bz2 ice-1cf6107ab5f200b2a224acd711d572341ec1a22f.tar.xz ice-1cf6107ab5f200b2a224acd711d572341ec1a22f.zip |
Added udp multicast support
Diffstat (limited to 'java/src/IceInternal/Network.java')
-rw-r--r-- | java/src/IceInternal/Network.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/java/src/IceInternal/Network.java b/java/src/IceInternal/Network.java index a3828f8e748..4f01e678c54 100644 --- a/java/src/IceInternal/Network.java +++ b/java/src/IceInternal/Network.java @@ -206,6 +206,22 @@ public final class Network } } + public static void + setReuseAddress(java.nio.channels.DatagramChannel fd, boolean reuse) + { + try + { + fd.socket().setReuseAddress(reuse); + } + catch(java.io.IOException ex) + { + closeSocketNoThrow(fd); + Ice.SocketException se = new Ice.SocketException(); + se.initCause(ex); + throw se; + } + } + public static java.net.InetSocketAddress doBind(java.nio.channels.ServerSocketChannel fd, java.net.InetSocketAddress addr) { |