[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] Multi-homed machine



Marcel wrote
> I don't think a java.net.Socket can be given two ore more specific
IPs.

just to confirm that suspition, I read back javadoc for ServerSocket &
Socket.

- ServerSocket
public ServerSocket(int port,int backlog,InetAddress bindAddr)
    The bindAddr argument can be used on a multi-homed host for a
ServerSocket that will only accept connect requests to one of its
addresses
- Socket
public Socket(String host,int port,InetAddress localAddr,int localPort)
    localAddr - the local address the socket is bound to

That confirm that socket interface can't bind on differente local IP.
Marcel 's idea, to duplicate protocol instance, seems to be the right
way.

Cyrille