class I2PServerSocketFull extends Object implements I2PServerSocket
| Constructor and Description |
|---|
I2PServerSocketFull(I2PSocketManagerFull mgr)Bridge to accept connections from the given manager. |
| Modifier and Type | Method and Description |
|---|---|
I2PSocket | accept()Waits for the next socket connecting. |
void | close()Close the connection. |
I2PSocketManager | getManager()Socket manager that owns this server socket. |
long | getSoTimeout()Current accept timeout. |
void | setSoTimeout(long x)Accept timeout in milliseconds. |
public I2PServerSocketFull(I2PSocketManagerFull mgr)
mgr - the socket manager to accept connections frompublic I2PSocket accept() throws I2PException, ConnectException, SocketTimeoutException
accept in interface I2PServerSocketI2PException - if there is a problem with reading a new socket
from the data available (e.g. the I2PSession is closed)RouterRestartException - (extends I2PException) if the router is apparently restarting, since 0.9.34ConnectException - if the I2PServerSocket is closed, or if interrupted.
Not actually thrown through 0.9.16; thrown as of 0.9.17SocketTimeoutException - if a timeout was previously set with setSoTimeout and the timeout has been reached.public void close()
close in interface I2PServerSocketpublic I2PSocketManager getManager()
getManager in interface I2PServerSocketpublic long getSoTimeout()
getSoTimeout in interface I2PServerSocketpublic void setSoTimeout(long x)
setSoTimeout in interface I2PServerSocketx - timeout in milliseconds