|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.transport.tcp.ConnectionHandler
public class ConnectionHandler
Class responsible for all of the handshaking necessary to turn a socket into a TCPConnection.
Field Summary | |
---|---|
static byte |
FLAG_PROTOCOL_NONE
protocol version sent if no protocols are ok |
static byte |
FLAG_TAG_FOLLOWING
alice is sending a tag to bob |
static byte |
FLAG_TAG_NOT_FOLLOWING
alice is not sending a tag to bob |
static byte |
FLAG_TAG_NOT_OK
the connection tag is not ok (must go with a full DH) |
static byte |
FLAG_TAG_OK
the connection tag is ok (we have an available key for it) |
static int |
FLAG_TEST
for reading/comparing, this is the #bytes sent if we are being tested |
static int |
STATUS_OK
the peer is fine |
static int |
STATUS_SIGNATURE_FAILED
the peer's signature failed (either some crazy corruption or MITM) |
static int |
STATUS_SKEWED
the peer's clock is too far skewed |
static int |
STATUS_UNKNOWN
dunno why the peer is bad |
static int |
STATUS_UNREACHABLE
the peer's public addresses could not be verified |
Constructor Summary | |
---|---|
ConnectionHandler(RouterContext ctx,
TCPTransport transport,
java.net.Socket socket)
|
Method Summary | |
---|---|
java.lang.String |
getError()
|
boolean |
getTestComplete()
|
static void |
main(java.lang.String[] args)
Verify the reachability of a peer. |
TCPConnection |
receiveConnection()
Blocking call to establish a TCP connection over the current socket. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FLAG_TEST
public static final byte FLAG_PROTOCOL_NONE
public static final byte FLAG_TAG_FOLLOWING
public static final byte FLAG_TAG_NOT_FOLLOWING
public static final byte FLAG_TAG_OK
public static final byte FLAG_TAG_NOT_OK
public static final int STATUS_UNKNOWN
public static final int STATUS_UNREACHABLE
public static final int STATUS_SKEWED
public static final int STATUS_SIGNATURE_FAILED
public static final int STATUS_OK
Constructor Detail |
---|
public ConnectionHandler(RouterContext ctx, TCPTransport transport, java.net.Socket socket)
Method Detail |
---|
public TCPConnection receiveConnection()
public java.lang.String getError()
public boolean getTestComplete()
public static void main(java.lang.String[] args)
ConnectionHandler hostname portNum
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |