Esempio n. 1
0
 public void dataAckReceived(Transport t) {
   aa(this, isClosurePending() || isConnected(), "dataAckReceived by invalid state");
   aa(this, isSender(), "dataAckReceived by non sender");
   if (t.getSeqNum() > this.sendBase) {
     this.sendBase = t.getSeqNum();
     p(this, 3, "dataAckReceived: advancing sendBase to " + sendBase);
     sendFromBuffer();
   } else
     p(
         this,
         3,
         "dataAckReceived: ignored sendBase >= ackNum: " + sendBase + " > " + t.getSeqNum());
 }
Esempio n. 2
0
  public void dataReceived(Transport t) {
    aa(this, isReceiver(), "DATA received by non receiver socket");
    aa(this, isConnected(), "DATA received by invalid socket state");

    int inSeqNum = t.getSeqNum();

    p(this, 3, "dataReceived() seqnum: " + inSeqNum);
    transportBuffer.put(inSeqNum, t);
    deliverToBuffer();

    dumpState(4);
    p(this, 3, "ending dataReceived");

    tcpMan.sendACK(this.tsid);
  }