/** * There is no noderef to pass downstream. If we want a connection, send our * noderef and wait for a reply, otherwise just send an ack. */ private void finishOpennetNoRelay() throws NotConnectedException { OpennetManager om = node.getOpennet(); if(om != null && (source.isOpennet() || node.passOpennetRefsThroughDarknet())) { finishOpennetNoRelayInner(om); } else { ackOpennet(); } }
/** * Either send an ack, indicating we've finished and aren't interested in opennet, * or wait for a noderef and relay it and wait for a response and relay that, * or send our own noderef and wait for a response and add that. * * One way or another this method must call applyByteCounts; unregisterRequestHandlerWithNode. * This happens asynchronously via ackOpennet() if we are unable to send a noderef. It * happens explicitly otherwise. */ private void finishOpennetChecked() throws NotConnectedException { OpennetManager om = node.getOpennet(); if(om != null && (node.passOpennetRefsThroughDarknet() || source.isOpennet())) { finishOpennetInner(om); } else { ackOpennet(); } }
Logger.minor(this, "Finishing opennet: sending own reference on "+this, new Exception("debug")); if(!om.wantPeer(null, false, false, false, ConnectionType.PATH_FOLDING)) { ackOpennet(); return; // Don't want a reference