|
||||||||||
| 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 |
SelectableChannel |
getChannel()
|
InputStream |
getInputStream()
|
int |
getLocalPort()
The local port. |
I2PSocketOptions |
getOptions()
|
OutputStream |
getOutputStream()
|
Destination |
getPeerDestination()
|
int |
getPort()
The remote port. |
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 failure
OutputStream getOutputStream()
throws IOException
IOException - on failure
SelectableChannel getChannel()
throws IOException
IOExceptionI2PSocketOptions getOptions()
void setOptions(I2PSocketOptions options)
options - I2PSocketOptions to setlong getReadTimeout()
void setReadTimeout(long ms)
ms - timeout in ms
void close()
throws IOException
IOException - on failureboolean isClosed()
void setSocketErrorListener(I2PSocket.SocketErrorListener lsnr)
int getPort()
int getLocalPort()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||