* Fixed race that (maybe) caused the problems reported by aum on

<http://dev.i2p.net/pipermail/i2p/2004-April/000214.html>;
* slightly revised locking;
* made accept() throw a ConnectException when the I2PServerSocket is closed.
(human)
This commit is contained in:
human
2004-04-14 15:28:02 +00:00
committed by zzz
parent 4cdd42f391
commit d2b09ecfda
2 changed files with 50 additions and 24 deletions

View File

@@ -1,5 +1,7 @@
package net.i2p.client.streaming;
import java.net.ConnectException;
import net.i2p.I2PException;
/**
@@ -17,13 +19,16 @@ public interface I2PServerSocket {
* connection and the local application wasn't .accept()ing new connections,
* they should get refused (if .accept() doesnt occur in some small period)
*
* @return a connected I2PSocket
*
* @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
*/
public I2PSocket accept() throws I2PException;
public I2PSocket accept() throws I2PException, ConnectException;
/**
* Access the manager which is coordinating the server socket
*/
public I2PSocketManager getManager();
}
}