Streaming: Change enforce protocol default to true

This commit is contained in:
zzz
2018-07-11 13:04:13 +00:00
parent 6ad1de8d85
commit 9d2f684ac7
2 changed files with 4 additions and 4 deletions

View File

@ -97,11 +97,10 @@ class ConnectionManager {
_connectionHandler = new ConnectionHandler(_context, this, _timer);
_tcbShare = new TCBShare(_context, _timer);
// PROTO_ANY is for backward compatibility (pre-0.7.1)
// TODO change proto to PROTO_STREAMING someday.
// Right now we get everything, and rely on Datagram to specify PROTO_UDP.
// PacketQueue has sent PROTO_STREAMING since the beginning of mux support (0.7.1)
// As of 0.9.1, new option to enforce streaming protocol, off by default
// As of 0.9.1, listen on configured port (default 0 = all)
// enforce protocol default changed to true in 0.9.36
int protocol = defaultOptions.getEnforceProtocol() ? I2PSession.PROTO_STREAMING : I2PSession.PROTO_ANY;
_session.addMuxedSessionListener(_messageHandler, protocol, defaultOptions.getLocalPort());
_outboundQueue = new PacketQueue(_context, _timer);

View File

@ -155,9 +155,10 @@ class ConnectionOptions extends I2PSocketOptionsImpl {
/**
* If PROTO is enforced, we cannot communicate with destinations earlier than version 0.7.1.
* Default true as of 0.9.36.
* @since 0.9.1
*/
private static final boolean DEFAULT_ENFORCE_PROTO = false;
private static final boolean DEFAULT_ENFORCE_PROTO = true;
private final int _trend[] = new int[TREND_COUNT];
@ -523,7 +524,7 @@ class ConnectionOptions extends I2PSocketOptionsImpl {
/**
* Do we receive all traffic, or only traffic marked with I2PSession.PROTO_STREAMING (6) ?
* Default false.
* Default true.
* If PROTO is enforced, we cannot communicate with destinations earlier than version 0.7.1
* (released March 2009), which is when streaming started sending the PROTO_STREAMING indication.
* Set to true if you are running multiple protocols on a single Destination.