# Package net.i2p.router.transport.ntcp

The NTCP (New TCP) transport for I2P, allowing I2P messages to be passed over TCP connections.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  EstablishState | Interface for handling NTCP connection establishment state machine.
  NTCP2Payload.PayloadCallback | For all callbacks, recommend throwing exceptions only from the handshake.

- Class Summary
  Class | Description
  --- | ---
  EstablishBase | Base class for NTCP connection establishment.
  EventPumper | The main NTCP NIO event loop thread responsible for high-throughput, low-latency handling of inbound and outbound NTCP connections using non-blocking I/O.
  InboundEstablishState | NTCP 2 inbound connection establishment state machine.
  NTCP2Options | NTCP2 Padding/Dummy/Delay configuration for data phase.
  NTCP2Payload | NTCP 2 payload generation and parsing utilities.
  NTCP2Payload.Block | Base class for NTCP 2 payload blocks.
  NTCP2Payload.DateTimeBlock | Block containing the current date and time.
  NTCP2Payload.I2NPBlock | Block containing I2NP message.
  NTCP2Payload.OptionsBlock | Block containing options data.
  NTCP2Payload.PaddingBlock | Block containing padding data.
  NTCP2Payload.RIBlock | Block containing router information.
  NTCP2Payload.TerminationBlock | Block containing termination data.
  NTCPConnection | Coordinates a connection to a single peer using NTCP 1 or NTCP 2 protocols.
  NTCPConnection.PrepBuffer | Buffer for preparing data to be written to the connection.
  NTCPSendFinisher | Handles asynchronous post-send processing of OutNetMessage using a fixed-size thread pool executor with a bounded queue and backpressure.
  NTCPTransport | Non-blocking TCP (NTCP) transport implementation for I2P.
  OutboundNTCP2State | NTCP 2 only.
  Reader | Pool of running threads which will process any read bytes on any of the NTCPConnections, including decryption of the data read, connection handshaking, parsing bytes into I2NP messages, etc.
  Writer | Pool of running threads which will transform the next I2NP message into something ready to be transferred over an NTCP connection, including encryption of the data read.

- Enum Summary
  Enum | Description
  --- | ---
  EstablishBase.State | States for NTCP connection establishment process.

## Package net.i2p.router.transport.ntcp Description

The NTCP (New TCP) transport for I2P, allowing I2P messages to be passed over TCP connections. NTCP replaces an older TCP transport that had congestion issues.

This package provides:

- TCP-based peer connections
- Reliable ordered delivery of I2P messages
- Transport establishment and authentication
- Connection management and pooling
- Network address translation (NAT) support

NTCP is one of the primary transport protocols used by I2P, providing reliable communication suitable for environments where UDP may be blocked or filtered.