## Uses of Interface
net.i2p.client.I2PSession

- Packages that use I2PSession
  Package | Description
  --- | ---
  net.i2p.client | Interfaces and factories for the base I2P SDK used to develop applications that communicate through I2P.
  net.i2p.client.datagram | Provides a standard way for reading and writing messages transferred over I2P so that recipient has an authenticated mechanism to reply to it.
  net.i2p.client.impl | Internal implementation of the I2P client SDK, providing the client side of the I2CP protocol for applications communicating through I2P.
  net.i2p.client.streaming | API, interfaces, and factory for a TCP-like (reliable, authenticated, in order) set of sockets for communicating over IP-like (unreliable, unauthenticated, unordered) I2P messages.
  net.i2p.client.streaming.impl | Implementation of a TCP-like (reliable, authenticated, in order) set of sockets for communicating over the IP-like (unreliable, unauthenticated, unordered) I2P messages.
  net.i2p.data | These classes define the common data structures used by the various I2P protocols.
  net.i2p.i2ptunnel | Implementation of preconfigured tunnels for both clients and servers, with a comprehensive UI for tunnel management and configuration.
  net.i2p.i2ptunnel.udp | Core API and interfaces used by UDP tunnel implementations.
  net.i2p.sam | The SAM (Simple Anonymous Messaging) client API.
  org.klomp.snark | I2P version of the snark bittorrent client, imported in 2005 and heavily enhanced to add a web UI, DHT support, and other features.
  org.klomp.snark.dht | Distributed Hash Table (DHT) implementation for BitTorrent.

- - ### Uses of I2PSession in net.i2p.client

    Methods in net.i2p.client that return I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `I2PSession` | I2PSession.`addSubsession(InputStream privateKeyStream, Properties opts)`
    `I2PSession` | I2PSimpleClient.`createSession(I2PAppContext context, Properties options)` Create a new session (though do not connect it yet)
    `I2PSession` | I2PClient.`createSession(InputStream destKeyStream, Properties options)` Create a new client session for the Destination stored at the destKeyStream using the specified options to both connect to the router, to instruct the router how to handle the new session, and to configure the end to end encryption.
    `I2PSession` | I2PSimpleClient.`createSession(InputStream destKeyStream, Properties options)` Create a new session (though do not connect it yet)

    Methods in net.i2p.client that return types with arguments of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `List<I2PSession>` | I2PSession.`getSubsessions()`

    Methods in net.i2p.client with parameters of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `void` | I2PSessionListener.`disconnected(I2PSession session)` Notify the client that the session has been terminated
    `void` | I2PSessionMuxedListener.`disconnected(I2PSession session)` Notify the client that the session has been terminated.
    `void` | I2PSessionListener.`errorOccurred(I2PSession session, String message, Throwable error)` Notify the client that some error occurred
    `void` | I2PSessionMuxedListener.`errorOccurred(I2PSession session, String message, Throwable error)` Notify the client that some error occurred.
    `void` | I2PSessionListener.`messageAvailable(I2PSession session, int msgId, long size)` Instruct the client that the given session has received a message with size # of bytes.
    `void` | I2PSessionMuxedListener.`messageAvailable(I2PSession session, int msgId, long size)` Will be called only if you register via setSessionListener() or addSessionListener().
    `void` | I2PSessionMuxedListener.`messageAvailable(I2PSession session, int msgId, long size, int proto, int fromport, int toport)` Instruct the client that the given session has received a message Will be called only if you register via addMuxedSessionListener().
    `void` | SendMessageStatusListener.`messageStatus(I2PSession session, long msgId, int status)` Tell the client of an update in the send status for a message previously sent with I2PSession.sendMessage().
    `void` | I2PSession.`removeSubsession(I2PSession session)`
    `void` | I2PSessionListener.`reportAbuse(I2PSession session, int severity)` Instruct the client that the session specified seems to be under attack and that the client may wish to move its destination to another router.
    `void` | I2PSessionMuxedListener.`reportAbuse(I2PSession session, int severity)` Instruct the client that the session specified seems to be under attack and that the client may wish to move its destination to another router.

  - ### Uses of I2PSession in net.i2p.client.datagram

    Methods in net.i2p.client.datagram with parameters of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `static Datagram2` | Datagram2.`load(I2PAppContext ctx, I2PSession session, byte[] dgram)` Load an I2P repliable datagram and verify the signature.
    `static Datagram3` | Datagram3.`load(I2PAppContext ctx, I2PSession session, byte[] dgram)` Load an I2P repliable datagram3.
    `static byte[]` | Datagram3.`make(I2PAppContext ctx, I2PSession session, byte[] payload)` Make a repliable I2P datagram3 containing the specified payload.
    `static byte[]` | Datagram2.`make(I2PAppContext ctx, I2PSession session, byte[] payload, Hash tohash)` Make a repliable I2P datagram2 containing the specified payload.
    `static byte[]` | Datagram2.`make(I2PAppContext ctx, I2PSession session, byte[] payload, Hash tohash, Properties options)` Make a repliable I2P datagram2 containing the specified payload.
    `static byte[]` | Datagram3.`make(I2PAppContext ctx, I2PSession session, byte[] payload, Properties options)` Make a repliable I2P datagram3 containing the specified payload.
    `void` | I2PDatagramMaker.`setI2PDatagramMaker(I2PSession session)` Does NOT support LS2 offline keys!

    Constructors in net.i2p.client.datagram with parameters of type I2PSession
    Constructor and Description
    `I2PDatagramMaker(I2PSession session)` Construct a new I2PDatagramMaker that will be able to create I2P repliable datagrams going to be sent through the specified I2PSession.

  - ### Uses of I2PSession in net.i2p.client.impl

    Classes in net.i2p.client.impl that implement I2PSession
    Modifier and Type | Class and Description
    --- | ---
    `class` | `I2PSessionImpl` Implementation of an I2P session running over TCP.
    `(package private) class` | `I2PSessionImpl2` Thread safe implementation of an I2P session running over TCP.
    `(package private) class` | `I2PSessionMuxedImpl` I2PSession with protocol and ports Streaming lib has been modified to send I2PSession.PROTO_STREAMING but still receives all.
    `class` | `I2PSimpleSession` Create a new session for doing naming and bandwidth queries only.
    `(package private) class` | `SubSession` An additional session using another session's connection.

    Methods in net.i2p.client.impl that return I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `I2PSession` | I2PSessionImpl.`addSubsession(InputStream privateKeyStream, Properties opts)` Router must be connected or was connected...
    `I2PSession` | SubSession.`addSubsession(InputStream destKeyStream, Properties opts)` Unsupported in a subsession.
    `I2PSession` | I2PClientImpl.`createSession(I2PAppContext context, InputStream destKeyStream, Properties options)` Create a new session (though do not connect it yet)
    `I2PSession` | I2PClientImpl.`createSession(InputStream destKeyStream, Properties options)` Create a new session (though do not connect it yet)

    Methods in net.i2p.client.impl that return types with arguments of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `List<I2PSession>` | I2PSessionImpl.`getSubsessions()`
    `List<I2PSession>` | SubSession.`getSubsessions()` Unsupported in a subsession.

    Methods in net.i2p.client.impl with parameters of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `void` | I2PSessionDemultiplexer.`disconnected(I2PSession session)`
    `void` | I2PSessionDemultiplexer.`errorOccurred(I2PSession session, String message, Throwable error)`
    `void` | I2PSessionDemultiplexer.`messageAvailable(I2PSession session, int msgId, long size)` unused
    `void` | I2PSessionDemultiplexer.`messageAvailable(I2PSession session, int msgId, long size, int proto, int fromport, int toport)`
    `void` | I2PSessionImpl.`removeSubsession(I2PSession session)`
    `void` | SubSession.`removeSubsession(I2PSession session)` Unsupported in a subsession.
    `void` | I2PSessionDemultiplexer.`reportAbuse(I2PSession session, int severity)`

    Constructors in net.i2p.client.impl with parameters of type I2PSession
    Constructor and Description
    `MessageState(I2PAppContext ctx, long nonce, I2PSession session, long expires, SendMessageStatusListener listener)` For asynchronous notification
    `SubSession(I2PSession primary, InputStream destKeyStream, Properties options)`

  - ### Uses of I2PSession in net.i2p.client.streaming

    Methods in net.i2p.client.streaming that return I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `I2PSession` | I2PSocketManager.`addSubsession(InputStream privateKeyStream, Properties opts)` For a server, you must call connect() on the returned object.
    `I2PSession` | I2PSocketManager.`getSession()`

    Methods in net.i2p.client.streaming that return types with arguments of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `List<I2PSession>` | I2PSocketManager.`getSubsessions()`

    Methods in net.i2p.client.streaming with parameters of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `void` | I2PSocketManager.`init(I2PAppContext context, I2PSession session, Properties opts, String name)` Deprecated - Factory will initialize.
    `void` | I2PSocketManager.`removeSubsession(I2PSession session)`

  - ### Uses of I2PSession in net.i2p.client.streaming.impl

    Fields in net.i2p.client.streaming.impl declared as I2PSession
    Modifier and Type | Field and Description
    --- | ---
    `protected I2PSession` | Packet.`_session`

    Methods in net.i2p.client.streaming.impl that return I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `I2PSession` | I2PSocketManagerFull.`addSubsession(InputStream privateKeyStream, Properties opts)` For a server, you must call connect() on the returned object.
    `I2PSession` | ConnectionManager.`getSession()` This is the primary session only
    `I2PSession` | I2PSocketManagerFull.`getSession()`
    `I2PSession` | Packet.`getSession()`
    `I2PSession` | Connection.`getSession()`

    Methods in net.i2p.client.streaming.impl that return types with arguments of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `List<I2PSession>` | I2PSocketManagerFull.`getSubsessions()`

    Methods in net.i2p.client.streaming.impl with parameters of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `Connection` | ConnectionManager.`connect(Destination peer, ConnectionOptions opts, I2PSession session)` Build a new connection to the given peer.
    `void` | MessageHandler.`disconnected(I2PSession session)` Notify the client that the session has been terminated As of 0.9.54, this does not clear the listeners, so they will be notified again after a subsequent connection and disconnection.
    `void` | MessageHandler.`errorOccurred(I2PSession session, String message, Throwable error)` Notify the client that some error occurred
    `void` | I2PSocketManagerFull.`init(I2PAppContext context, I2PSession session, Properties opts, String name)` Deprecated. use 4-arg constructor
    `void` | MessageHandler.`messageAvailable(I2PSession session, int msgId, long size)` Instruct the client that the given session has received a message with size # of bytes.
    `void` | MessageHandler.`messageAvailable(I2PSession session, int msgId, long size, int proto, int fromPort, int toPort)` Instruct the client that the given session has received a message with size # of bytes.
    `void` | PacketQueue.`messageStatus(I2PSession session, long msgId, int status)` SendMessageStatusListener interface Tell the client of an update in the send status for a message previously sent with I2PSession.sendMessage().
    `void` | I2PSocketManagerFull.`removeSubsession(I2PSession session)` Remove the subsession
    `void` | MessageHandler.`reportAbuse(I2PSession session, int severity)` Instruct the client that the session specified seems to be under attack and that the client may wish to move its destination to another router.

    Constructors in net.i2p.client.streaming.impl with parameters of type I2PSession
    Constructor and Description
    `Connection(I2PAppContext ctx, ConnectionManager manager, I2PSession session, SchedulerChooser chooser, SimpleTimer2 timer, PacketQueue queue, ConnectionPacketHandler handler, ConnectionOptions opts, boolean isInbound)`
    `ConnectionManager(I2PAppContext context, I2PSession session, ConnectionOptions defaultOptions, IncomingConnectionFilter connectionFilter)` Manage all conns for this session
    `I2PSocketManagerFull(I2PAppContext context, I2PSession session, Properties opts, String name, IncomingConnectionFilter connectionFilter)` This is what I2PSocketManagerFactory.createManager() returns.
    `Packet(I2PSession session)` Does no initialization.
    `PacketLocal(I2PAppContext ctx, Destination to, I2PSession session)` not bound to a connection

  - ### Uses of I2PSession in net.i2p.data

    Methods in net.i2p.data that return I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `I2PSession` | PrivateKeyFile.`open()`
    `I2PSession` | PrivateKeyFile.`open(Properties opts)`

    Constructors in net.i2p.data with parameters of type I2PSession
    Constructor and Description
    `PrivateKeyFile(File file, I2PSession session)`

  - ### Uses of I2PSession in net.i2p.i2ptunnel

    Methods in net.i2p.i2ptunnel that return types with arguments of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `List<I2PSession>` | I2PTunnel.`getSessions()`

    Methods in net.i2p.i2ptunnel with parameters of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | TunnelControllerGroup.`acquire(TunnelController controller, I2PSession session)` Note the fact that the controller is using the session so that it isn't destroyed prematurely.
    `(package private) void` | I2PTunnel.`addSession(I2PSession session)`
    `void` | I2PTunnelTask.`connected(I2PSession session)` For tasks that don't call I2PTunnel.addSession() directly
    `void` | I2PTunnelTask.`disconnected(I2PSession session)` Called when a session is disconnected.
    `void` | I2PTunnelTask.`errorOccurred(I2PSession session, String message, Throwable error)` Does nothing here.
    `(package private) void` | TunnelControllerGroup.`release(TunnelController controller, I2PSession session)` Note the fact that the controller is no longer using the session, and if no other controllers are using it, destroy the session.
    `(package private) void` | I2PTunnel.`removeSession(I2PSession session)`
    `void` | I2PTunnelTask.`reportAbuse(I2PSession session, int severity)` Does nothing here.

  - ### Uses of I2PSession in net.i2p.i2ptunnel.udp

    Fields in net.i2p.i2ptunnel.udp declared as I2PSession
    Modifier and Type | Field and Description
    --- | ---
    `protected I2PSession` | I2PSource.`sess`
    `protected I2PSession` | I2PSink.`sess`
    `protected I2PSession` | I2PSinkAnywhere.`sess`

    Methods in net.i2p.i2ptunnel.udp with parameters of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `void` | I2PSource.Listener.`disconnected(I2PSession arg0)`
    `void` | I2PSource.Listener.`errorOccurred(I2PSession arg0, String arg1, Throwable arg2)`
    `void` | I2PSource.Listener.`messageAvailable(I2PSession sess, int id, long size)`
    `void` | I2PSource.Listener.`messageAvailable(I2PSession session, int id, long size, int proto, int fromPort, int toPort)`
    `void` | I2PSource.Listener.`reportAbuse(I2PSession arg0, int arg1)`

    Constructors in net.i2p.i2ptunnel.udp with parameters of type I2PSession
    Constructor and Description
    `I2PSink(I2PSession sess, Destination dest)` repliable (not raw)
    `I2PSink(I2PSession sess, Destination dest, boolean raw)`
    `I2PSink(I2PSession sess, Destination dest, boolean raw, int toPort)`
    `I2PSinkAnywhere(I2PSession sess)`
    `I2PSinkAnywhere(I2PSession sess, boolean raw)`
    `I2PSource(I2PSession sess)` Handles both REPLIABLE and RAW on any port
    `I2PSource(I2PSession sess, I2PSource.Protocol protocol)` Listen on all I2CP ports.
    `I2PSource(I2PSession sess, I2PSource.Protocol protocol, int port)`

  - ### Uses of I2PSession in net.i2p.sam

    Methods in net.i2p.sam that return I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `protected I2PSession` | SAMMessageSession.`getI2PSession()` Get the I2PSession object used by the SAM message-based session.

    Methods in net.i2p.sam with parameters of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `void` | MasterSession.`disconnected(I2PSession session)`
    `void` | MasterSession.`errorOccurred(I2PSession session, String message, Throwable error)`
    `void` | MasterSession.`messageAvailable(I2PSession session, int msgId, long size)`
    `void` | MasterSession.`messageAvailable(I2PSession session, int msgId, long size, int proto, int fromPort, int toPort)`
    `void` | MasterSession.`reportAbuse(I2PSession session, int severity)`

    Constructors in net.i2p.sam with parameters of type I2PSession
    Constructor and Description
    `SAMDatagramSession(I2PSession sess, Properties props, int listenPort, SAMDatagramReceiver recv)` Create a new SAM DATAGRAM session on an existing I2P session.
    `SAMMessageSession(I2PSession sess, int listenProtocol, int listenPort)` Initialize a new SAM message-based session using an existing I2PSession.
    `SAMRawSession(I2PSession sess, Properties props, int listenProtocol, int listenPort, SAMRawReceiver recv)` Create a new SAM RAW session on an existing I2P session.
    `SAMv3DatagramSession(String nick, Properties props, SAMv3Handler handler, I2PSession isess, int listenPort, SAMv3DatagramServer dgServer)` Build a Datagram Session on an existing i2p session registered with the given nickname Caller MUST call start().
    `SAMv3RawSession(String nick, Properties props, SAMv3Handler handler, I2PSession isess, int listenProtocol, int listenPort, SAMv3DatagramServer dgServer)` Build a Raw Session on an existing i2p session registered with the given nickname Caller MUST call start().

  - ### Uses of I2PSession in org.klomp.snark

    Methods in org.klomp.snark with parameters of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `void` | UDPTrackerClient.`disconnected(I2PSession session)`
    `void` | UDPTrackerClient.`errorOccurred(I2PSession session, String message, Throwable error)`
    `void` | UDPTrackerClient.`messageAvailable(I2PSession session, int msgId, long size)` for non-muxed
    `void` | UDPTrackerClient.`messageAvailable(I2PSession session, int msgId, long size, int proto, int fromPort, int toPort)` Instruct the client that the given session has received a message
    `void` | UDPTrackerClient.`reportAbuse(I2PSession session, int severity)`

    Constructors in org.klomp.snark with parameters of type I2PSession
    Constructor and Description
    `UDPTrackerClient(I2PAppContext ctx, I2PSession session, I2PSnarkUtil util)`

  - ### Uses of I2PSession in org.klomp.snark.dht

    Methods in org.klomp.snark.dht with parameters of type I2PSession
    Modifier and Type | Method and Description
    --- | ---
    `void` | KRPC.`disconnected(I2PSession session)`
    `void` | KRPC.`errorOccurred(I2PSession session, String message, Throwable error)`
    `void` | KRPC.`messageAvailable(I2PSession session, int msgId, long size)` for non-muxed
    `void` | KRPC.`messageAvailable(I2PSession session, int msgId, long size, int proto, int fromPort, int toPort)` Instruct the client that the given session has received a message
    `void` | KRPC.`reportAbuse(I2PSession session, int severity)`

    Constructors in org.klomp.snark.dht with parameters of type I2PSession
    Constructor and Description
    `KRPC(I2PAppContext ctx, String baseName, I2PSession session)`