I2PSocket.SocketErrorListener
コンストラクタ | 説明 |
---|---|
SocketWrapper(java.net.Socket sock) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
close() |
|
java.nio.channels.SelectableChannel |
getChannel() |
推奨されていません。
|
java.io.InputStream |
getInputStream() |
As of 0.9.9 will throw an IOE if socket is closed.
|
int |
getLocalPort() |
The local port.
|
I2PSocketOptions |
getOptions() |
|
java.io.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 |
reset() |
Just calls close()
|
void |
setOptions(I2PSocketOptions options) |
Does nothing
|
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
|
public Destination getThisDestination()
getThisDestination
インタフェース内 I2PSocket
public Destination getPeerDestination()
getPeerDestination
インタフェース内 I2PSocket
public java.io.InputStream getInputStream() throws java.io.IOException
I2PSocket
Note that operations on the returned stream may return an
IOException
whose cause as returned by
Throwable.getCause()
is an I2PSocketException
.
If so, the client may retrieve a status code via
I2PSocketException.getStatus()
to provide specific feedback to the user.
getInputStream
インタフェース内 I2PSocket
java.io.IOException
- on failurepublic java.io.OutputStream getOutputStream() throws java.io.IOException
I2PSocket
Note that operations on the returned stream may return an
IOException
whose cause as returned by
Throwable.getCause()
is an I2PSocketException
.
If so, the client may retrieve a status code via
I2PSocketException.getStatus()
to provide specific feedback to the user.
getOutputStream
インタフェース内 I2PSocket
java.io.IOException
- on failure@Deprecated public java.nio.channels.SelectableChannel getChannel()
I2PSocket
getChannel
インタフェース内 I2PSocket
public I2PSocketOptions getOptions()
getOptions
インタフェース内 I2PSocket
public void setOptions(I2PSocketOptions options)
setOptions
インタフェース内 I2PSocket
options
- I2PSocketOptions to setpublic long getReadTimeout()
I2PSocket
getReadTimeout
インタフェース内 I2PSocket
public void setReadTimeout(long ms)
I2PSocket
setReadTimeout
インタフェース内 I2PSocket
ms
- timeout in mspublic void close() throws java.io.IOException
close
インタフェース内 java.lang.AutoCloseable
close
インタフェース内 java.io.Closeable
java.io.IOException
public void reset() throws java.io.IOException
public void setSocketErrorListener(I2PSocket.SocketErrorListener lsnr)
setSocketErrorListener
インタフェース内 I2PSocket
public int getPort()
public int getLocalPort()
getLocalPort
インタフェース内 I2PSocket