|
||||||||||
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 |
InputStream |
getInputStream()
|
I2PSocketOptions |
getOptions()
|
OutputStream |
getOutputStream()
|
Destination |
getPeerDestination()
|
long |
getReadTimeout()
How long we will wait blocked on a read() operation. |
Destination |
getThisDestination()
|
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()
InputStream getInputStream() throws IOException
IOException
- on failureOutputStream getOutputStream() throws IOException
IOException
- on failureI2PSocketOptions getOptions()
void setOptions(I2PSocketOptions options)
options
- I2PSocketOptions to setlong getReadTimeout()
void setReadTimeout(long ms)
ms
- timeout in msvoid close() throws IOException
IOException
- on failureboolean isClosed()
void setSocketErrorListener(I2PSocket.SocketErrorListener lsnr)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |