in src/main/java/com/microsoft/azure/proton/transport/proxy/impl/ProxyImpl.java [239:249]
public int capacity() {
if (getIsHandshakeInProgress()) {
if (tailClosed) {
return Transport.END_OF_STREAM;
} else {
return inputBuffer.remaining();
}
} else {
return underlyingInput.capacity();
}
}