On Thu, 2011-08-11 at 20:10 +0100, Gordon Sim wrote: > http://download.oracle.com/javase/1.5.0/docs/guide/net/ipv6_guide/index.html > > Which claims: "With Java you can run any Java applications, client or > server, on an IPv6-enabled platform using J2SE 1.4 or later, and that > application will automagically become IPv6-enabled." > > It also states: > > "that on a dual-stack machine, since one socket, the IPv6 socket, will > be able to access both IPv4 and IPv6 protocol stacks, you only need to > create one socket" > > does this mean on Linux we don't need to create multiple sockets to > listen on?
That is correct, you can use an IPv6 socket to accept IPv4 connections too, but there are good reasons you might want to create separate v4 and v6 only listening sockets. Essentially this gives you stronger control over the protocols individually if you need that, although this rationale in c/c++ might not fully exist in Java - I don't understand the details there fully. In order to do this with a single socket though it needs to be a v6 socket. Reading that doc briefly it looks like the reconnect logic might be transparent to the application which would be nice and explain why I didn't see it anywhere. Andrew --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscr...@qpid.apache.org