forked from I2P_Developers/i2p.i2p
SSU2 minor updates
Send ack for peer test and relay blocks Add SSU2 pending inbound states to establisher check Remove unused PacketBuilder2 method
This commit is contained in:
@@ -315,6 +315,9 @@ class EstablishmentManager {
|
||||
case IB_STATE_CREATED_SENT:
|
||||
case IB_STATE_CONFIRMED_PARTIALLY:
|
||||
case IB_STATE_CONFIRMED_COMPLETELY:
|
||||
case IB_STATE_TOKEN_REQUEST_RECEIVED:
|
||||
case IB_STATE_REQUEST_BAD_TOKEN_RECEIVED:
|
||||
case IB_STATE_RETRY_SENT:
|
||||
// queue it
|
||||
inState.addMessage(msg);
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
|
@@ -719,16 +719,6 @@ class PacketBuilder2 {
|
||||
return rv;
|
||||
}
|
||||
|
||||
/**
|
||||
* build intro packets for each of the published introducers
|
||||
*
|
||||
* @param emgr only to call emgr.isValid()
|
||||
* @return empty list on failure
|
||||
*/
|
||||
public List<UDPPacket> buildRelayRequest(EstablishmentManager emgr, OutboundEstablishState2 state) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* From Alice to Bob.
|
||||
* In-session.
|
||||
|
@@ -434,22 +434,30 @@ public class PeerState2 extends PeerState implements SSU2Payload.PayloadCallback
|
||||
public void gotRelayRequest(byte[] data) {
|
||||
if (!ENABLE_RELAY)
|
||||
return;
|
||||
// Relay blocks are ACK-eliciting
|
||||
messagePartiallyReceived();
|
||||
}
|
||||
|
||||
public void gotRelayResponse(int status, byte[] data) {
|
||||
if (!ENABLE_RELAY)
|
||||
return;
|
||||
// Relay blocks are ACK-eliciting
|
||||
messagePartiallyReceived();
|
||||
}
|
||||
|
||||
public void gotRelayIntro(Hash aliceHash, byte[] data) {
|
||||
if (!ENABLE_RELAY)
|
||||
return;
|
||||
// Relay blocks are ACK-eliciting
|
||||
messagePartiallyReceived();
|
||||
}
|
||||
|
||||
public void gotPeerTest(int msg, int status, Hash h, byte[] data) {
|
||||
if (!ENABLE_PEER_TEST)
|
||||
return;
|
||||
_transport.getPeerTestManager().receiveTest(_remoteHostId, this, msg, status, h, data);
|
||||
// Peer Test block is ACK-eliciting
|
||||
messagePartiallyReceived();
|
||||
}
|
||||
|
||||
public void gotToken(long token, long expires) {
|
||||
|
Reference in New Issue
Block a user