|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SocketFactory
Provides pluggable socket creation for JXTA TCP connection (not those for HTTP since those are from URLConnection).
The motivation for this class was to provide the ability to tunnel JXTA TCP through a web proxy but it could be used for other things as well. Call IPUtils.setSocketFactory() to configure JXTA to use a particular socket factory
Method Summary | |
---|---|
Socket |
createConnection(InetAddress inetAddress,
int port,
InetAddress usingInterface,
int localPort,
int timeout)
creates and returns a connected Socket. |
Method Detail |
---|
Socket createConnection(InetAddress inetAddress, int port, InetAddress usingInterface, int localPort, int timeout) throws IOException
inetAddress
- the destination IP address used to create an
InetSocketAddress that will be used with the connect() call on
the created socket.port
- the destination TCP port used to create an
InetSocketAddress that will be used with the connect() call on
the created socket.usingInterface
- the src (local) IP address used to create
an InetSocketAddress to which the created socket will be bound
via bind().localPort
- the src (local) TCP port used to create an
InetSocketAddress to which the created socket will be bound via
bind().timeout
- the time in milliseconds to be used with the
socket.connect() call. A value of zero means infinite timeout.
IOException
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |