Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

## Package net.i2p.client

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

See:
Description

Interface Summary
I2CPMessageHandler | Define a way to handle a particular type of message
I2PClient | Define the standard means of interacting with the I2P system
I2PSession | Define the standard means of sending and receiving messages on the I2P network by using the I2CP (the client protocol).
I2PSessionListener | Define a means for the router to asynchronously notify the client that a new message is available or the router is under attack.
I2PSessionMuxedListener | Define a means for the router to asynchronously notify the client that a new message is available or the router is under attack.

Class Summary
BWLimitsMessageHandler | Handle I2CP BW replies from the router
ClientWriterRunner | Copied from net.i2p.router.client We need a single thread that writes so we don't have issues with the Piped Streams used in InternalSocket.
DestReplyMessageHandler | Handle I2CP dest replies from the router
DisconnectMessageHandler | Handle I2CP disconnect messages from the router
HandlerImpl | Base class for handling I2CP messages
I2CPMessageProducer | Produce the various messages the session needs to send to the router.
I2PClientFactory | Provide a means of hooking into an appropriate I2PClient implementation
I2PClientImpl | Base client implementation
I2PClientMessageHandlerMap | Contains a map of message handlers that a session will want to use
I2PSessionDemultiplexer | Implement multiplexing with a 1-byte 'protocol' and a two-byte 'port'.
I2PSessionImpl | Implementation of an I2P session running over TCP.
I2PSessionImpl2 | Thread safe implementation of an I2P session running over TCP.
I2PSessionMuxedImpl | I2PSession with protocol and ports Streaming lib has been modified to send I2PSession.PROTO_STREAMING but still receives all.
I2PSimpleClient | Simple client implementation with no Destination, just used to talk to the router.
I2PSimpleSession | Create a new session for doing naming and bandwidth queries only.
MessagePayloadMessageHandler | Handle I2CP MessagePayloadMessages from the router delivering the contents of a message by accepting it, decrypting the payload, adding it to the set of recieved messages, and telling the router that it has been recieved correctly.
MessageState | Contains the state of a payload message being sent to a peer
MessageStatusMessageHandler | Handle I2CP MessageStatusMessages from the router.
RequestLeaseSetMessageHandler | Handle I2CP RequestLeaseSetMessage from the router by granting all leases
SessionIdleTimer | Reduce tunnels or shutdown the session on idle if so configured
SessionStatusMessageHandler | Handle I2CP SessionStatusMessagese from the router, updating the session as necssary.
SetDateMessageHandler | Handle I2CP time messages from the router

Exception Summary
I2PSessionException | Thrown when there is a problem doing something on the session

## Package net.i2p.client Description

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 `I2PClient` from the `I2PClientFactory`. If it does not already have a `Destination`, it must generate one with the `I2PClient.createDestination(java.io.OutputStream)` before proceeding. Once it has one, it then creates an `I2PSession` which serves as the bridge to the I2P network, allowing it to send messages (via `I2PSession.sendMessage(net.i2p.data.Destination, byte[])`) and receive messages (via `I2PSession.receiveMessage(int)`). In addition, the client receives asynchronous notification of network activity by providing an implementation of `I2PSessionListener`.

A simple example of how these base client classes can be used is the 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:

- `net.i2p.client.datagram` - for applications that want their messages to be both authenticated and repliable
- `net.i2p.client.naming` - for applications that want to resolve readable names into `Destination`s
- `net.i2p.client.streaming` - for applications that want to use a streaming API to provide reliable in order message delivery (note: the streaming library is packaged seperate from the main SDK - in the mstreaming.jar and streaming.jar)

The `I2PSession` implementation itself communicates with the I2P router by the I2CP (the client protocol).

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES