Lock down streaming classes not in the API. Holler if this breaks any external apps.
This commit is contained in:
@ -6,7 +6,7 @@ import java.util.Properties;
|
|||||||
* Define the configuration for streaming and verifying data on the socket.
|
* Define the configuration for streaming and verifying data on the socket.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class I2PSocketOptionsImpl implements I2PSocketOptions {
|
class I2PSocketOptionsImpl implements I2PSocketOptions {
|
||||||
private long _connectTimeout;
|
private long _connectTimeout;
|
||||||
private long _readTimeout;
|
private long _readTimeout;
|
||||||
private long _writeTimeout;
|
private long _writeTimeout;
|
||||||
|
@ -22,7 +22,7 @@ import net.i2p.util.SimpleTimer2;
|
|||||||
* destinations.
|
* destinations.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Connection {
|
class Connection {
|
||||||
private I2PAppContext _context;
|
private I2PAppContext _context;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
private ConnectionManager _connectionManager;
|
private ConnectionManager _connectionManager;
|
||||||
@ -1067,7 +1067,7 @@ public class Connection {
|
|||||||
/**
|
/**
|
||||||
* Coordinate the resends of a given packet
|
* Coordinate the resends of a given packet
|
||||||
*/
|
*/
|
||||||
public class ResendPacketEvent extends SimpleTimer2.TimedEvent {
|
class ResendPacketEvent extends SimpleTimer2.TimedEvent {
|
||||||
private PacketLocal _packet;
|
private PacketLocal _packet;
|
||||||
private long _nextSendTime;
|
private long _nextSendTime;
|
||||||
public ResendPacketEvent(PacketLocal packet, long delay) {
|
public ResendPacketEvent(PacketLocal packet, long delay) {
|
||||||
|
@ -17,7 +17,7 @@ import net.i2p.util.SimpleTimer;
|
|||||||
*
|
*
|
||||||
* @author zzz modded to use concurrent and bound queue size
|
* @author zzz modded to use concurrent and bound queue size
|
||||||
*/
|
*/
|
||||||
public class ConnectionHandler {
|
class ConnectionHandler {
|
||||||
private I2PAppContext _context;
|
private I2PAppContext _context;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
private ConnectionManager _manager;
|
private ConnectionManager _manager;
|
||||||
|
@ -20,7 +20,7 @@ import net.i2p.util.SimpleTimer;
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ConnectionManager {
|
class ConnectionManager {
|
||||||
private I2PAppContext _context;
|
private I2PAppContext _context;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
private I2PSession _session;
|
private I2PSession _session;
|
||||||
|
@ -15,7 +15,7 @@ import net.i2p.util.Log;
|
|||||||
* Define the current options for the con (and allow custom tweaking midstream)
|
* Define the current options for the con (and allow custom tweaking midstream)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ConnectionOptions extends I2PSocketOptionsImpl {
|
class ConnectionOptions extends I2PSocketOptionsImpl {
|
||||||
private int _connectDelay;
|
private int _connectDelay;
|
||||||
private boolean _fullySigned;
|
private boolean _fullySigned;
|
||||||
private boolean _answerPings;
|
private boolean _answerPings;
|
||||||
|
@ -14,7 +14,7 @@ import net.i2p.util.SimpleTimer;
|
|||||||
* queue, marking packets as acked, updating various fields, etc.
|
* queue, marking packets as acked, updating various fields, etc.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ConnectionPacketHandler {
|
class ConnectionPacketHandler {
|
||||||
private I2PAppContext _context;
|
private I2PAppContext _context;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import net.i2p.I2PException;
|
|||||||
* Bridge to allow accepting new connections
|
* Bridge to allow accepting new connections
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class I2PServerSocketFull implements I2PServerSocket {
|
class I2PServerSocketFull implements I2PServerSocket {
|
||||||
private I2PSocketManagerFull _socketManager;
|
private I2PSocketManagerFull _socketManager;
|
||||||
|
|
||||||
public I2PServerSocketFull(I2PSocketManagerFull mgr) {
|
public I2PServerSocketFull(I2PSocketManagerFull mgr) {
|
||||||
|
@ -10,7 +10,7 @@ import net.i2p.data.Destination;
|
|||||||
* Bridge between the full streaming lib and the I2PSocket API
|
* Bridge between the full streaming lib and the I2PSocket API
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class I2PSocketFull implements I2PSocket {
|
class I2PSocketFull implements I2PSocket {
|
||||||
private Connection _connection;
|
private Connection _connection;
|
||||||
private I2PSocket.SocketErrorListener _listener;
|
private I2PSocket.SocketErrorListener _listener;
|
||||||
private Destination _remotePeer;
|
private Destination _remotePeer;
|
||||||
|
@ -23,7 +23,7 @@ import net.i2p.util.Log;
|
|||||||
* or receive any messages with its .receiveMessage
|
* or receive any messages with its .receiveMessage
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class I2PSocketManagerFull implements I2PSocketManager {
|
class I2PSocketManagerFull implements I2PSocketManager {
|
||||||
private I2PAppContext _context;
|
private I2PAppContext _context;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
private I2PSession _session;
|
private I2PSession _session;
|
||||||
|
@ -15,7 +15,7 @@ import net.i2p.util.ConcurrentHashSet;
|
|||||||
* Packets, if we can.
|
* Packets, if we can.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MessageHandler implements I2PSessionListener {
|
class MessageHandler implements I2PSessionListener {
|
||||||
private ConnectionManager _manager;
|
private ConnectionManager _manager;
|
||||||
private I2PAppContext _context;
|
private I2PAppContext _context;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
|
@ -19,7 +19,7 @@ import net.i2p.util.Log;
|
|||||||
* yet present them in order.
|
* yet present them in order.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MessageInputStream extends InputStream {
|
class MessageInputStream extends InputStream {
|
||||||
private final I2PAppContext _context;
|
private final I2PAppContext _context;
|
||||||
private final Log _log;
|
private final Log _log;
|
||||||
/**
|
/**
|
||||||
|
@ -15,7 +15,7 @@ import net.i2p.util.SimpleTimer2;
|
|||||||
* on flush or when the buffer is full. It also blocks according
|
* on flush or when the buffer is full. It also blocks according
|
||||||
* to the data receiver's needs.
|
* to the data receiver's needs.
|
||||||
*/
|
*/
|
||||||
public class MessageOutputStream extends OutputStream {
|
class MessageOutputStream extends OutputStream {
|
||||||
private final I2PAppContext _context;
|
private final I2PAppContext _context;
|
||||||
private final Log _log;
|
private final Log _log;
|
||||||
private byte _buf[];
|
private byte _buf[];
|
||||||
|
@ -53,7 +53,7 @@ import net.i2p.util.Log;
|
|||||||
* packet that should not be ACKed</p>
|
* packet that should not be ACKed</p>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Packet {
|
class Packet {
|
||||||
private long _sendStreamId;
|
private long _sendStreamId;
|
||||||
private long _receiveStreamId;
|
private long _receiveStreamId;
|
||||||
private long _sequenceNum;
|
private long _sequenceNum;
|
||||||
|
@ -15,7 +15,7 @@ import net.i2p.util.Log;
|
|||||||
* the server socket, or queue a reply RST packet.
|
* the server socket, or queue a reply RST packet.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PacketHandler {
|
class PacketHandler {
|
||||||
private ConnectionManager _manager;
|
private ConnectionManager _manager;
|
||||||
private I2PAppContext _context;
|
private I2PAppContext _context;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
|
@ -12,7 +12,7 @@ import net.i2p.util.SimpleTimer2;
|
|||||||
* coordinate local attributes about a packet - send time, ack time, number of
|
* coordinate local attributes about a packet - send time, ack time, number of
|
||||||
* retries, etc.
|
* retries, etc.
|
||||||
*/
|
*/
|
||||||
public class PacketLocal extends Packet implements MessageOutputStream.WriteStatus {
|
class PacketLocal extends Packet implements MessageOutputStream.WriteStatus {
|
||||||
private I2PAppContext _context;
|
private I2PAppContext _context;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
private Connection _connection;
|
private Connection _connection;
|
||||||
|
@ -18,7 +18,7 @@ import net.i2p.util.Log;
|
|||||||
* mode=bestEffort doesnt block in the SDK.
|
* mode=bestEffort doesnt block in the SDK.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PacketQueue {
|
class PacketQueue {
|
||||||
private I2PAppContext _context;
|
private I2PAppContext _context;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
private I2PSession _session;
|
private I2PSession _session;
|
||||||
|
@ -3,7 +3,10 @@ package net.i2p.client.streaming;
|
|||||||
import net.i2p.util.SimpleTimer2;
|
import net.i2p.util.SimpleTimer2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Not clear that we really need to create our own timer group, but we do,
|
||||||
|
* to prevent us clogging the router's timer group.
|
||||||
|
* Use from outside this package is deprecated.
|
||||||
|
* (BOB instantiates this for thread group reasons)
|
||||||
*/
|
*/
|
||||||
public class RetransmissionTimer extends SimpleTimer2 {
|
public class RetransmissionTimer extends SimpleTimer2 {
|
||||||
private static final RetransmissionTimer _instance = new RetransmissionTimer();
|
private static final RetransmissionTimer _instance = new RetransmissionTimer();
|
||||||
|
@ -10,7 +10,7 @@ import net.i2p.util.Log;
|
|||||||
* Examine a connection's state and pick the right scheduler for it.
|
* Examine a connection's state and pick the right scheduler for it.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SchedulerChooser {
|
class SchedulerChooser {
|
||||||
private I2PAppContext _context;
|
private I2PAppContext _context;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
private TaskScheduler _nullScheduler;
|
private TaskScheduler _nullScheduler;
|
||||||
|
@ -20,7 +20,7 @@ import net.i2p.util.SimpleTimer2;
|
|||||||
* same router.
|
* same router.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TCBShare {
|
class TCBShare {
|
||||||
private I2PAppContext _context;
|
private I2PAppContext _context;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
private Map<Destination, Entry> _cache;
|
private Map<Destination, Entry> _cache;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
in logger.config to get system default format)
|
in logger.config to get system default format)
|
||||||
- Force RuntimeExceptions to CRIT level
|
- Force RuntimeExceptions to CRIT level
|
||||||
- Don't have log() count buffer size
|
- Don't have log() count buffer size
|
||||||
|
* Streaming: Make all classes outside the API package private
|
||||||
* UDP:
|
* UDP:
|
||||||
- Fix bug causing PacketPusher to loop quickly instead of sleeping
|
- Fix bug causing PacketPusher to loop quickly instead of sleeping
|
||||||
- Fix udp.sendCycleTime stat
|
- Fix udp.sendCycleTime stat
|
||||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 14;
|
public final static long BUILD = 15;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "";
|
||||||
|
Reference in New Issue
Block a user