主权项 |
1. A method of sending a data packet by a source node, comprising:
comparing an available source token count with a first positive threshold and a second positive threshold; in response to at least one source token being available, decrementing the available source token count and sending a data packet to a receiver; in response to the available source token count being greater than the first threshold, decrementing the available source token count and sending the data packet; in response to the available source token count being equal to the first positive threshold:
creating a first update token control message,inserting the first update token control message as a piggyback message in the data packet, andsending the data packet including the piggyback message to the receiver; in response to the available source token count being less than the first positive threshold and greater than the second positive threshold, decrementing the available source token count and sending the data packet to the receiver; in response to the available source token count being less than the first positive threshold, less than or equal to the second positive threshold, and greater than 0:
creating a second update token control message,inserting the second update token control message as a piggyback message in the data packet, andsending the data packet including the piggyback message to the receiver; in response to the available source token count being not greater than zero, sending a third update tokens control message and starting a token time, wherein in response to the token timer timing out before new tokens are received in a update tokens control message from the receiver, determining that a connection is broken and closing a flow. |