public interface I2PSocket
| Modifier and Type | Interface and Description |
|---|---|
static interface |
I2PSocket.SocketErrorListener
Allow notification of underlying errors communicating across I2P without
waiting for any sort of cleanup process.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
Destination getThisDestination()
Destination getPeerDestination()
InputStream getInputStream() throws IOException
IOException - on failureOutputStream getOutputStream() throws IOException
IOException - on failureSelectableChannel getChannel() throws IOException
IOExceptionI2PSocketOptions 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)
int getPort()
int getLocalPort()