net.i2p.router.transport.tcp
Class ConnectionBuilder
java.lang.Object
net.i2p.router.transport.tcp.ConnectionBuilder
public class ConnectionBuilder
- extends java.lang.Object
Class responsible for all of the handshaking necessary to establish a
connection with a peer.
Method Summary |
TCPConnection |
establishConnection()
Blocking call to establish a TCP connection to the given peer through a
brand new socket. |
java.lang.String |
getError()
Brief description of why the connection failed (or null if it succeeded) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONNECTION_TIMEOUT
public static final int CONNECTION_TIMEOUT
- If the connection hasn't been built in 30 seconds, give up
- See Also:
- Constant Field Values
WRITE_BUFFER_SIZE
public static final int WRITE_BUFFER_SIZE
- See Also:
- Constant Field Values
ConnectionBuilder
public ConnectionBuilder(RouterContext context,
TCPTransport transport,
RouterInfo info)
establishConnection
public TCPConnection establishConnection()
- Blocking call to establish a TCP connection to the given peer through a
brand new socket.
- Returns:
- fully established but not yet running connection, or null on error
getError
public java.lang.String getError()
- Brief description of why the connection failed (or null if it succeeded)