Added Simple true/false storage class to the utilities

Added socketSoTimeout
CHANGED RetransmissionTimer is now public
FIXED SimpleTimer has a way to be stopped, and reap it's children
FIXED Lots of javadoc additions, where I could
CLEANUP all code that needed to catch the timeout exception for socketSoTimeout
This commit is contained in:
sponge
2008-09-25 23:59:01 +00:00
parent ee2fd32a97
commit dd7d993631
13 changed files with 540 additions and 146 deletions

View File

@@ -2,6 +2,7 @@ package net.i2p.client.streaming;
import java.net.ConnectException;
import java.net.SocketTimeoutException;
import net.i2p.I2PException;
/**
@@ -9,6 +10,7 @@ import net.i2p.I2PException;
*
*/
public interface I2PServerSocket {
/**
* Closes the socket.
*/
@@ -24,8 +26,21 @@ public interface I2PServerSocket {
* @throws I2PException if there is a problem with reading a new socket
* from the data available (aka the I2PSession closed, etc)
* @throws ConnectException if the I2PServerSocket is closed
* @throws SocketTimeoutException
*/
public I2PSocket accept() throws I2PException, ConnectException, SocketTimeoutException;
/**
* Set Sock Option accept timeout
* @param x
*/
public void setSoTimeout(long x);
/**
* Get Sock Option accept timeout
* @return timeout
*/
public I2PSocket accept() throws I2PException, ConnectException;
public long getSoTimeout();
/**
* Access the manager which is coordinating the server socket