forked from I2P_Developers/i2p.i2p
I2CP Multisession support and multiple destinations in one tunnel pool.
Work in progress. Router-side I2CP mostly done. Client-side I2CP mostly done but undecided on how to handle listeners. Streaming stubbed out but may be wrong, may need multiple socket managers, not clear how to proceed. I2PTunnel not started. Blacklist of DSA-only dests not started. Router leaseset publishing not correct. Not clear whether to have additional tunnel pools with flags, or put the tunnel pools into the client hashmap twice. Client config contains destination, may need to move that to tunnel pool.
This commit is contained in:
@@ -5,17 +5,20 @@
|
||||
package net.i2p.client.streaming;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.net.ConnectException;
|
||||
import java.net.NoRouteToHostException;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.I2PException;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.Destination;
|
||||
|
||||
|
||||
@@ -34,6 +37,26 @@ public interface I2PSocketManager {
|
||||
*/
|
||||
public I2PSession getSession();
|
||||
|
||||
/**
|
||||
* @return a new subsession, non-null
|
||||
* @param privateKeyStream null for transient, if non-null must have same encryption keys as primary session
|
||||
* and different signing keys
|
||||
* @param opts subsession options if any, may be null
|
||||
* @since 0.9.19
|
||||
*/
|
||||
public I2PSession addSubsession(InputStream privateKeyStream, Properties opts) throws I2PSessionException;
|
||||
|
||||
/**
|
||||
* @since 0.9.19
|
||||
*/
|
||||
public void removeSubsession(I2PSession session);
|
||||
|
||||
/**
|
||||
* @return a list of subsessions, non-null, does not include the primary session
|
||||
* @since 0.9.19
|
||||
*/
|
||||
public List<I2PSession> getSubsessions();
|
||||
|
||||
/**
|
||||
* How long should we wait for the client to .accept() a socket before
|
||||
* sending back a NACK/Close?
|
||||
|
Reference in New Issue
Block a user