forked from I2P_Developers/i2p.i2p
* Streaming: Move streaming to new package (ticket #1135)
This commit is contained in:
@ -1,6 +1,10 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PException;
|
||||
import net.i2p.client.streaming.AcceptingChannel;
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.client.streaming.I2PServerSocket;
|
||||
import net.i2p.client.streaming.I2PSocketManager;
|
||||
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.ConnectException;
|
||||
@ -29,7 +33,7 @@ class AcceptingChannelImpl extends AcceptingChannel {
|
||||
private volatile I2PSocket next;
|
||||
private final I2PServerSocket socket;
|
||||
|
||||
I2PSocket accept() throws I2PException, ConnectException {
|
||||
public I2PSocket accept() throws I2PException, ConnectException {
|
||||
I2PSocket sock;
|
||||
try {
|
||||
sock = socket.accept();
|
||||
@ -43,7 +47,7 @@ class AcceptingChannelImpl extends AcceptingChannel {
|
||||
}
|
||||
}
|
||||
|
||||
AcceptingChannelImpl(I2PSocketManager manager) {
|
||||
protected AcceptingChannelImpl(I2PSocketManager manager) {
|
||||
super(manager);
|
||||
// this cheats and just sets the manager timeout low in order to repeatedly poll it.
|
||||
// that means we can "only" accept one new connection every 100 milliseconds.
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.data.ByteArray;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
@ -1,4 +1,7 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.client.streaming.I2PSocketOptionsImpl;
|
||||
import net.i2p.client.streaming.I2PSocketOptions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,7 +1,11 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.net.SocketTimeoutException;
|
||||
import net.i2p.I2PException;
|
||||
import net.i2p.client.streaming.I2PServerSocket;
|
||||
import net.i2p.client.streaming.AcceptingChannel;
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.client.streaming.I2PSocketManager;
|
||||
|
||||
/**
|
||||
* Bridge to allow accepting new connections
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -10,6 +10,8 @@ import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.data.Destination;
|
||||
import net.i2p.util.Log;
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.client.streaming.I2PSocketOptions;
|
||||
|
||||
/**
|
||||
* Bridge between the full streaming lib and the I2PSocket API
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.NoRouteToHostException;
|
||||
@ -17,7 +17,10 @@ import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.Destination;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
import net.i2p.client.streaming.I2PSocketManager;
|
||||
import net.i2p.client.streaming.I2PSocketOptions;
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.client.streaming.I2PServerSocket;
|
||||
|
||||
/**
|
||||
* Centralize the coordination and multiplexing of the local client's streaming.
|
@ -1,4 +1,6 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
@ -9,6 +9,7 @@ import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.client.I2PSessionMuxedListener;
|
||||
import net.i2p.client.streaming.I2PSocketManager.DisconnectListener;
|
||||
import net.i2p.util.Log;
|
||||
import net.i2p.client.streaming.I2PSocketManager;
|
||||
|
||||
/**
|
||||
* Receive raw information from the I2PSession and turn it into
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSession;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.util.SimpleTimer2;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.util.Log;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.util.Log;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.util.Log;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.util.Log;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.util.Log;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
@ -9,6 +9,7 @@ import java.net.SocketException;
|
||||
import java.nio.channels.ServerSocketChannel;
|
||||
|
||||
import net.i2p.I2PException;
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
|
||||
/**
|
||||
* Bridge to I2PServerSocket.
|
@ -1,4 +1,7 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.client.streaming.I2PSocketOptions;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
/**
|
||||
* Coordinates what we do 'next'. The scheduler used by a connection is
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client.streaming;
|
||||
package net.i2p.client.streaming.impl;
|
||||
|
||||
import net.i2p.I2PException;
|
||||
|
Reference in New Issue
Block a user