net.i2p.client.streaming
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
|
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) |
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)