-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TxAlgorithm refinements. Keepalive. (#132)
- Loading branch information
1 parent
ffdc817
commit c80469c
Showing
4 changed files
with
69 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package dilithium | ||
|
||
import "time" | ||
|
||
// TxAlgorithm is an abstraction of an extensible flow-control implementation, which can be plugged into a TxPortal | ||
// instance. | ||
// | ||
type TxAlgorithm interface { | ||
Ready(int) | ||
Tx(int) | ||
Success(int) | ||
DuplicateAck() | ||
Retransmission(int) | ||
UpdateRTT(rttMs int) | ||
RetxMs() int | ||
RxPortalSize() int | ||
Profile() *TxProfile | ||
} | ||
|
||
// TxProfile defines all of the configurable values that are requested by a flow control algorithm. | ||
// | ||
type TxProfile struct { | ||
RetxBatchMs int | ||
SendKeepalive bool | ||
ConnectionTimeout time.Duration | ||
MaxTreeSize int | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters