beginning of branch i2p.i2p.i2p

This commit is contained in:
cvs_import
2004-04-08 04:41:54 +00:00
committed by zzz
commit 77bd69c5e5
292 changed files with 41035 additions and 0 deletions

View File

@@ -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;
}