# Package net.i2p.router.client

Router-side implementation of the I2CP (I2P Client Protocol) interface for application integration.

See: Description

- Class Summary
  Class | Description
  --- | ---
  ClientConnectionRunner | Bridge the router and the client - managing state for a client.
  ClientListenerRunner | Listen for connections on the specified port, and toss them onto the client manager's set of connections once they are established.
  ClientManager | Coordinate connections and various tasks
  ClientManagerFacadeImpl | Base impl of the client facade
  ClientMessageEventListener | Receive events from the client and handle them accordingly (updating the runner when necessary)
  ClientWriterRunner | Async writer class so that if a client app hangs, it won't take down the whole router with it (otherwise the JobQueue would block until the client reads from their i2cp socket, causing all sorts of bad things to happen) For external I2CP connections only.
  CreateSessionJob | Given an established connection, walk through the process of establishing the leaseset.
  I2CPMessageQueueImpl | Contains the methods to talk to a router or client via I2CP, when both are in the same JVM.
  LeaseRequestState | Bundle up the data points necessary when asynchronously requesting a lease from a client
  LookupDestJob | Look up the lease of a hash, to convert it to a Destination for the client.
  MessageReceivedJob | Async job to notify the client that a new message is available for them, or just send it directly if specified.
  QueuedClientConnectionRunner | Zero-copy in-JVM.
  ReportAbuseJob | Async job to send an abuse message to the client
  RequestLeaseSetJob | Async job to walk the client through generating a lease set.
  SSLClientListenerRunner | SSL version of ClientListenerRunner

## Package net.i2p.router.client Description

Router-side implementation of the I2CP (I2P Client Protocol) interface for application integration.

This package implements the router side of the I2CP interface, which provides the standard API for applications to communicate through the I2P network. The I2CP protocol allows external applications to create destinations, manage tunnels, send and receive messages, and access I2P services without implementing the full router functionality.

Key Components:

- ClientManager - Manages client connections and sessions
- ClientConnection - Handles individual client connections
- ClientListener - Accepts and manages new client connections
- I2CPMessageHandler - Processes I2CP protocol messages
- I2CPMessageReader - Reads and parses I2CP messages
- I2CPMessageWriter - Writes and formats I2CP messages
- ClientMessageEventListener - Handles client message events
- LeaseRequest - Manages lease requests for clients
- SessionConfig - Configuration for client sessions

Main Functionality:

- I2CP protocol implementation and message handling
- Client connection management and authentication
- Destination creation and management for clients
- Tunnel creation and management on behalf of clients
- Message routing between clients and the network
- Session management and configuration
- LeaseSet management and renewal
- Client statistics and monitoring

I2CP Message Types:

- CreateSession - Establishes new client session
- DestroySession - Terminates client session
- RequestLeaseSet - Requests tunnel leases
- SendMessage - Sends messages through I2P
- ReceiveMessage - Delivers messages to clients
- RequestVariableLeaseSet - Manages variable tunnel leases

Usage Notes:

- Provides the standard interface for I2P applications
- Client side implementation is in net.i2p.client
- Essential for application integration with I2P
- Supports both streaming and datagram communication