|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface I2PSocket
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.
Nested Class Summary | |
---|---|
static interface |
I2PSocket.SocketErrorListener
Allow notification of underlying errors communicating across I2P without waiting for any sort of cleanup process. |
Method Summary | |
---|---|
void |
close()
Closes the socket if not closed yet |
java.io.InputStream |
getInputStream()
Return an InputStream to read from the socket. |
I2PSocketOptions |
getOptions()
Retrieve this socket's configuration |
java.io.OutputStream |
getOutputStream()
Return an OutputStream to write into the socket. |
Destination |
getPeerDestination()
Return the destination of the peer. |
long |
getReadTimeout()
How long we will wait blocked on a read() operation. |
Destination |
getThisDestination()
Return the Destination of this side of the socket. |
boolean |
isClosed()
|
void |
setOptions(I2PSocketOptions options)
Configure the socket |
void |
setReadTimeout(long ms)
Define how long we will wait blocked on a read() operation (-1 will make the socket wait forever). |
void |
setSocketErrorListener(I2PSocket.SocketErrorListener lsnr)
|
Method Detail |
---|
Destination getThisDestination()
Destination getPeerDestination()
java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
I2PSocketOptions getOptions()
void setOptions(I2PSocketOptions options)
long getReadTimeout()
void setReadTimeout(long ms)
void close() throws java.io.IOException
java.io.IOException
boolean isClosed()
void setSocketErrorListener(I2PSocket.SocketErrorListener lsnr)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |