2005-03-26 jrandom

* Added some error handling and fairly safe to cache data to the streaming
      lib (good call Tom!)
This commit is contained in:
jrandom
2005-03-26 07:13:38 +00:00
committed by zzz
parent 0626f714c6
commit ebac4df2d3
5 changed files with 56 additions and 16 deletions

View File

@ -62,6 +62,8 @@ public interface I2PSocket {
*/
public void close() throws IOException;
public boolean isClosed();
public void setSocketErrorListener(SocketErrorListener lsnr);
/**
* Allow notification of underlying errors communicating across I2P without

View File

@ -233,6 +233,8 @@ class I2PSocketImpl implements I2PSocket {
in.notifyClosed();
}
public boolean isClosed() { return _closedOn > 0; }
/**
* Close the socket from the I2P side (by a close packet)
*/