/** Wraps buffer size events, from the application side to the network side */ @Override public void setBufferSize(int bufferSize) { handler.setBufferSize(bufferSize); }
@Override public void onQueue(int size) { if (peer != null) { peer.handler.setBufferSize(size == 0 ? MAX_BUFFER_SIZE : 0); } }
@Override public void onQueue(int size) { if (logLevel >= LOG_VERBOSE) { Log.v("onQueue(" + size + ")" + send); } if (!context.isQueueStatusChanged(size, lastSize)) { return; } int bufferSize = size == 0 ? 0 : Connection.MAX_BUFFER_SIZE; // block or unblock all "TerminateConnection"s when mux is congested or smooth for (TerminalConnection connection : connectionMap. values().toArray(EMPTY_CONNECTIONS)) { // "setBuferSize" might change "connectionMap" connection.handler.setBufferSize(bufferSize); } if (logLevel >= LOG_DEBUG) { Log.d((size == 0 ? "All Terminal Connections Unblocked due to Smooth Mux" : "All Terminal Connections Blocked due to Congested Mux (" + size + ")") + send); } }
if (connection != null && packet.size >= 2) { int bufferSize = Bytes.toShort(b, off) & 0xFFFF; connection.handler.setBufferSize(bufferSize); if (logLevel >= LOG_VERBOSE) { Log.v("HANDLER_BUFFER: " + bufferSize +