public interface I2PServerSocketI2PSocketManager.getServerSocket().
Defines how to listen for streaming peer connections.Note that this is not a standard Java ServerSocket,
if you need one of those, use I2PSocketManager.getStandardServerSocket() instead.
| Modifier and Type | Method and Description |
|---|---|
I2PSocket | accept()Waits for the next socket connecting. |
void | close()Closes the socket. |
I2PSocketManager | getManager()Access the manager which is coordinating the server socket |
long | getSoTimeout()Get Sock Option accept timeout |
void | setSoTimeout(long x)Set Sock Option accept timeout |
I2PSocket accept() throws I2PException, ConnectException, SocketTimeoutException
I2PException - if there is a problem with reading a new socket
from the data available (e.g. the I2PSession is closed);
as of 0.9.61, this may be an I2PSessionException which extends I2PExceptionRouterRestartException - (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.void close()
throws I2PExceptionI2PExceptionI2PSocketManager getManager()
long getSoTimeout()
void setSoTimeout(long x)
x - timeout in ms