{% extends "_layout.html" %} {% block title %}Client Package{% endblock %} {% block content %}

Implements the base I2P SDK for developing applications that communicate through I2P.

When a client application wants to communicate over I2P, the first thing it needs to do is get a {@link net.i2p.client.I2PClient} from the {@link net.i2p.client.I2PClientFactory}. If it does not already have a {@link net.i2p.data.Destination}, it must generate one with the {@link net.i2p.client.I2PClient#createDestination} before proceeding. Once it has one, it then creates an {@link net.i2p.client.I2PSession} which serves as the bridge to the I2P network, allowing it to send messages (via {@link net.i2p.client.I2PSession#sendMessage}) and receive messages (via {@link net.i2p.client.I2PSession#receiveMessage}). In addition, the client receives asynchronous notification of network activity by providing an implementation of {@link net.i2p.client.I2PSessionListener}.

A simple example of how these base client classes can be used is the {@link net.i2p.client.ATalk} application. It isn't really useful, but it is heavily documented code.

This client package provides the basic necessity for communicating over I2P, but there are three other subpackages that are helpful. Specifically:

The {@link net.i2p.client.I2PSession} implementation itself communicates with the I2P router by the I2CP (the client protocol).

{% endblock %}