Package net.i2p.client.streaming.impl
Class I2PServerSocketFull
java.lang.Object
net.i2p.client.streaming.impl.I2PServerSocketFull
- All Implemented Interfaces:
I2PServerSocket
Bridge to allow accepting new connections
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept()Waits for the next socket connecting.voidclose()Close the connection.Deprecated.Access the manager which is coordinating the server socketlongGet Sock Option accept timeoutvoidsetSoTimeout(long x) Set Sock Option accept timeout
-
Constructor Details
-
I2PServerSocketFull
-
-
Method Details
-
accept
Waits for the next socket connecting. If a remote user tried to make a connection and the local application wasn't .accept()ing new connections, they should get refused (if .accept() doesnt occur in some small period). Warning - unlike regular ServerSocket, may return null (through 0.9.16 only).- Specified by:
acceptin interfaceI2PServerSocket- Returns:
- a connected I2PSocket OR NULL through 0.9.16; never null as of 0.9.17
- Throws:
I2PException- 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.
-
getChannel
Deprecated.Unimplemented, unlikely to ever be implemented.- Specified by:
getChannelin interfaceI2PServerSocket- Returns:
- null always
- Since:
- 0.8.11
-
getSoTimeout
public long getSoTimeout()Description copied from interface:I2PServerSocketGet Sock Option accept timeout- Specified by:
getSoTimeoutin interfaceI2PServerSocket- Returns:
- timeout in ms
-
setSoTimeout
public void setSoTimeout(long x) Description copied from interface:I2PServerSocketSet Sock Option accept timeout- Specified by:
setSoTimeoutin interfaceI2PServerSocket- Parameters:
x- timeout in ms
-
close
public void close()Close the connection.- Specified by:
closein interfaceI2PServerSocket
-
getManager
Description copied from interface:I2PServerSocketAccess the manager which is coordinating the server socket- Specified by:
getManagerin interfaceI2PServerSocket- Returns:
- _socketManager
-