## net.i2p.router.transport.ntcp
Class EstablishState

    java.lang.Object
      net.i2p.router.transport.ntcp.EstablishState

    public class EstablishState

extends java.lang.Object

Constructor Summary
`EstablishState(RouterContext ctx, NTCPTransport transport, NTCPConnection con)`

Method Summary
`static void` `checkHost(java.lang.String[] args)`
`boolean` `confirmWritten()` we have written all of the data required to confirm the connection establishment
`java.lang.String` `getError()`
`java.lang.Exception` `getException()`
`byte[]` `getExtraBytes()` if complete, this will contain any bytes received as part of the handshake that were after the actual handshake.
`boolean` `getFailedBySkew()`
`boolean` `isComplete()`
`boolean` `isCorrupt()` did the handshake fail for some reason?
`static void` `main(java.lang.String[] args)`
`void` `prepareOutbound()` we are establishing an outbound connection, so prepare ourselves by queueing up the write of the first part of the handshake
`void` `receive(java.nio.ByteBuffer src)` parse the contents of the buffer as part of the handshake.
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### EstablishState

    public EstablishState(RouterContext ctx,
                          NTCPTransport transport,
                          NTCPConnection con)

Method Detail

### receive

    public void receive(java.nio.ByteBuffer src)

  parse the contents of the buffer as part of the handshake. if the handshake is completed and there is more data remaining, the buffer is updated so that the next read will be the (still encrypted) remaining data (available from getExtraBytes)

### confirmWritten

    public boolean confirmWritten()

  we have written all of the data required to confirm the connection establishment

### getFailedBySkew

    public boolean getFailedBySkew()

### isCorrupt

    public boolean isCorrupt()

  did the handshake fail for some reason?

### isComplete

    public boolean isComplete()

  Returns:
    is the handshake complete and valid?

### prepareOutbound

    public void prepareOutbound()

  we are establishing an outbound connection, so prepare ourselves by queueing up the write of the first part of the handshake

### getExtraBytes

    public byte[] getExtraBytes()

  if complete, this will contain any bytes received as part of the handshake that were after the actual handshake. This may return null.

### getError

    public java.lang.String getError()

### getException

    public java.lang.Exception getException()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### checkHost

    public static void checkHost(java.lang.String[] args)

### main

    public static void main(java.lang.String[] args)