forked from I2P_Developers/i2p.i2p
beginning of branch i2p.i2p.i2p
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package net.i2p.client.streaming;
|
||||
|
||||
import net.i2p.data.Destination;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Minimalistic adapter between the socket api and I2PTunnel's way.
|
||||
* Note that this interface is a "subinterface" of the interface
|
||||
* defined in the "official" streaming api.
|
||||
*/
|
||||
public interface I2PSocket {
|
||||
/**
|
||||
* Return the Destination of this side of the socket.
|
||||
*/
|
||||
public Destination getThisDestination();
|
||||
|
||||
/**
|
||||
* Return the destination of the peer.
|
||||
*/
|
||||
public Destination getPeerDestination();
|
||||
|
||||
/**
|
||||
* Return an InputStream to read from the socket.
|
||||
*/
|
||||
public InputStream getInputStream() throws IOException;
|
||||
|
||||
/**
|
||||
* Return an OutputStream to write into the socket.
|
||||
*/
|
||||
public OutputStream getOutputStream() throws IOException;
|
||||
|
||||
/**
|
||||
* Closes the socket if not closed yet
|
||||
*/
|
||||
public void close() throws IOException;
|
||||
}
|
||||
Reference in New Issue
Block a user