Changeset 61749aa for apps/ministreaming


Ignore:
Timestamp:
Sep 27, 2008 10:59:22 PM (13 years ago)
Author:
sponge <sponge@…>
Branches:
master
Children:
5913d9e
Parents:
b0313bd6
Message:

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
CLEANUP A few javadoc additions, where I could figgure out bits
CLEANUP all code that needed to catch the timeout exception for socketSoTimeout

Location:
apps/ministreaming/java/src/net/i2p/client/streaming
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PServerSocket.java

    rb0313bd6 r61749aa  
    33import java.net.ConnectException;
    44
     5import java.net.SocketTimeoutException;
    56import net.i2p.I2PException;
    67
     
    2526     *         from the data available (aka the I2PSession closed, etc)
    2627     * @throws ConnectException if the I2PServerSocket is closed
     28     * @throws SocketTimeoutException
    2729     */
    28     public I2PSocket accept() throws I2PException, ConnectException;
     30    public I2PSocket accept() throws I2PException, ConnectException, SocketTimeoutException;
     31
     32    /**
     33     * Set Sock Option accept timeout
     34     * @param x
     35     */
     36    public void setSoTimeout(long x);
     37
     38    /**
     39     * Get Sock Option accept timeout
     40     * @return timeout
     41     */
     42    public long getSoTimeout();
    2943
    3044    /**
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PServerSocketImpl.java

    rb0313bd6 r61749aa  
    3131    private Object socketAddedLock = new Object();
    3232   
     33    /**
     34     * Set Sock Option accept timeout stub, does nothing
     35     * @param x
     36     */
     37    public void setSoTimeout(long x) {
     38    }
     39
     40    /**
     41     * Get Sock Option accept timeout stub, does nothing
     42     * @return timeout
     43     */
     44    public long getSoTimeout() {
     45        return -1;
     46    }
     47
    3348    public I2PServerSocketImpl(I2PSocketManager mgr) {
    3449        this.mgr = mgr;
  • apps/ministreaming/java/src/net/i2p/client/streaming/StreamSinkServer.java

    rb0313bd6 r61749aa  
    66import java.io.InputStream;
    77import java.net.ConnectException;
     8import java.net.SocketTimeoutException;
    89import java.util.Properties;
    910
     
    108109                    _log.error("Connection already dropped", ce);
    109110                    return;
     111                } catch(SocketTimeoutException ste) {
     112                    // ignored
    110113                }       
    111114            }
Note: See TracChangeset for help on using the changeset viewer.