net.i2p.client.streaming
I2PSocket.SocketErrorListener
Constructor and Description |
---|
I2PSocketFull(Connection con) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the socket if not closed yet
|
(package private) void |
destroy() |
(package private) Connection |
getConnection() |
InputStream |
getInputStream()
Warning, may return null instead of throwing IOE,
which is not what the interface says.
|
I2PSocketOptions |
getOptions() |
OutputStream |
getOutputStream()
Warning, may return null instead of throwing IOE,
which is not what the interface says.
|
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) |
String |
toString() |
public I2PSocketFull(Connection con)
public void close() throws IOException
I2PSocket
close
in interface I2PSocket
IOException
- on failureConnection getConnection()
public InputStream getInputStream()
getInputStream
in interface I2PSocket
public I2PSocketOptions getOptions()
getOptions
in interface I2PSocket
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface I2PSocket
IOException
- on failurepublic Destination getPeerDestination()
getPeerDestination
in interface I2PSocket
public long getReadTimeout()
I2PSocket
getReadTimeout
in interface I2PSocket
public Destination getThisDestination()
getThisDestination
in interface I2PSocket
public void setOptions(I2PSocketOptions options)
I2PSocket
setOptions
in interface I2PSocket
options
- I2PSocketOptions to setpublic void setReadTimeout(long ms)
I2PSocket
setReadTimeout
in interface I2PSocket
ms
- timeout in mspublic void setSocketErrorListener(I2PSocket.SocketErrorListener lsnr)
setSocketErrorListener
in interface I2PSocket
void destroy()