Ignore:
Timestamp:
Jan 5, 2011 4:41:41 PM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f8a2bef
Parents:
532c9d3
Message:
Location:
apps/ministreaming/java/src/net/i2p/client/streaming
Files:
3 edited

Legend:

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

    r532c9d3 r226cb7fd  
    55 * so care should be taken when using in a multithreaded environment.
    66 *
     7 * @deprecated Only used by deprecated I2PSocketImpl
    78 */
    89class ByteCollector {
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManager.java

    r532c9d3 r226cb7fd  
    55package net.i2p.client.streaming;
    66
     7import java.io.IOException;
    78import java.io.InterruptedIOException;
    89import java.net.ConnectException;
    910import java.net.NoRouteToHostException;
     11import java.net.ServerSocket;
     12import java.net.Socket;
    1013import java.util.Properties;
    1114import java.util.Set;
     
    8588     * @return a set of currently connected I2PSockets
    8689     */
    87     public Set listSockets();
     90    public Set<I2PSocket> listSockets();
    8891
    8992    /**
     
    108111        public void sessionDisconnected();
    109112    }
     113
     114    /**
     115     *  Like getServerSocket but returns a real ServerSocket for easier porting of apps.
     116     *  @since 0.8.4
     117     */
     118    public ServerSocket getStandardServerSocket() throws IOException;
     119
     120    /**
     121     *  Like connect() but returns a real Socket, and throws only IOE,
     122     *  for easier porting of apps.
     123     *  @since 0.8.4
     124     */
     125    public Socket connectToSocket(Destination peer) throws IOException;
     126
     127    /**
     128     *  Like connect() but returns a real Socket, and throws only IOE,
     129     *  for easier porting of apps.
     130     *  @param timeout ms if > 0, forces blocking (disables connectDelay)
     131     *  @since 0.8.4
     132     */
     133    public Socket connectToSocket(Destination peer, int timeout) throws IOException;
    110134}
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerImpl.java

    r532c9d3 r226cb7fd  
    1111import java.net.ConnectException;
    1212import java.net.NoRouteToHostException;
     13import java.net.ServerSocket;
     14import java.net.Socket;
    1315import java.util.ArrayList;
    1416import java.util.HashMap;
     
    463465
    464466    /**
     467     *  @throws UnsupportedOperationException
     468     *  @since 0.8.4
     469     */
     470    public ServerSocket getStandardServerSocket() {
     471        throw new UnsupportedOperationException();
     472    }
     473
     474    /**
    465475     * Create a new connected socket (block until the socket is created)
    466476     *
     
    603613
    604614    /**
     615     *  @throws UnsupportedOperationException
     616     *  @since 0.8.4
     617     */
     618    public Socket connectToSocket(Destination peer) {
     619        throw new UnsupportedOperationException();
     620    }
     621
     622    /**
     623     *  @throws UnsupportedOperationException
     624     *  @since 0.8.4
     625     */
     626    public Socket connectToSocket(Destination peer, int timeout) {
     627        throw new UnsupportedOperationException();
     628    }
     629
     630    /**
    605631     * Destroy the socket manager, freeing all the associated resources.  This
    606632     * method will block untill all the managed sockets are closed.
     
    661687     *
    662688     */
    663     public Set listSockets() {
     689    public Set<I2PSocket> listSockets() {
    664690        Set<I2PSocket> sockets = new HashSet<I2PSocket>(8);
    665691        synchronized (lock) {
Note: See TracChangeset for help on using the changeset viewer.