コード例 #1
0
ファイル: TCPSock.java プロジェクト: sherwinyu/class
 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());
 }
コード例 #2
0
ファイル: TCPSock.java プロジェクト: sherwinyu/class
  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);
  }