forked from I2P_Developers/i2p.i2p
* Streaming:
- Add new real sockets for easier porting of apps. See http://zzz.i2p/topics/792 for info. Untested. - de-SpongeCase - Javadoc
This commit is contained in:
@ -4,9 +4,12 @@
|
||||
*/
|
||||
package net.i2p.client.streaming;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.net.ConnectException;
|
||||
import java.net.NoRouteToHostException;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
@ -84,7 +87,7 @@ public interface I2PSocketManager {
|
||||
*
|
||||
* @return a set of currently connected I2PSockets
|
||||
*/
|
||||
public Set listSockets();
|
||||
public Set<I2PSocket> listSockets();
|
||||
|
||||
/**
|
||||
* Ping the specified peer, returning true if they replied to the ping within
|
||||
@ -107,4 +110,25 @@ public interface I2PSocketManager {
|
||||
public static interface DisconnectListener {
|
||||
public void sessionDisconnected();
|
||||
}
|
||||
|
||||
/**
|
||||
* Like getServerSocket but returns a real ServerSocket for easier porting of apps.
|
||||
* @since 0.8.4
|
||||
*/
|
||||
public ServerSocket getStandardServerSocket() throws IOException;
|
||||
|
||||
/**
|
||||
* Like connect() but returns a real Socket, and throws only IOE,
|
||||
* for easier porting of apps.
|
||||
* @since 0.8.4
|
||||
*/
|
||||
public Socket connectToSocket(Destination peer) throws IOException;
|
||||
|
||||
/**
|
||||
* Like connect() but returns a real Socket, and throws only IOE,
|
||||
* for easier porting of apps.
|
||||
* @param timeout ms if > 0, forces blocking (disables connectDelay)
|
||||
* @since 0.8.4
|
||||
*/
|
||||
public Socket connectToSocket(Destination peer, int timeout) throws IOException;
|
||||
}
|
||||
|
Reference in New Issue
Block a user