コード例 #1
0
  private void handleTimeout(Event event) {
    Tx tx = getSystem().getTxs().get(event.getTxIndex());

    if (!tx.isTransmiting()) {
      tx.handleTimeOutEvent();
      newTxPacketHeadsToRouter(tx);
    } else tx.handleTimeOutEvent();
  }
コード例 #2
0
 private void handleTxPacketHeadsToRouter(Event event) {
   Tx tx = getSystem().getTxs().get(event.getTxIndex());
   if (tx.getNextPacketToSend() < tx.getOldestNotReceivedPacket() + tx.getCongestionWindow())
     newTxPacketHeadsToRouter(tx);
   else tx.setTransmiting(false);
 }