public interface I2PSocket extends Closeable
Modifier and Type | Interface and Description |
---|---|
static interface |
I2PSocket.SocketErrorListener
Deprecated, unimplemented, does nothing.
|
Modifier and Type | Method and Description |
---|---|
SelectableChannel |
getChannel()
Deprecated.
|
InputStream |
getInputStream()
As of 0.9.9 will throw an IOE if socket is closed.
|
int |
getLocalPort()
The local port.
|
I2PSocketOptions |
getOptions() |
OutputStream |
getOutputStream()
As of 0.9.9 will throw an IOE if socket is closed.
|
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)
Deprecated, unimplemented, does nothing
|
Destination getThisDestination()
Destination getPeerDestination()
InputStream getInputStream() throws IOException
IOException
- on failureOutputStream getOutputStream() throws IOException
IOException
- on failureSelectableChannel getChannel() throws IOException
IOException
I2PSocketOptions getOptions()
void setOptions(I2PSocketOptions options)
options
- I2PSocketOptions to setlong getReadTimeout()
void setReadTimeout(long ms)
ms
- timeout in msboolean isClosed()
void setSocketErrorListener(I2PSocket.SocketErrorListener lsnr)
int getPort()
int getLocalPort()