Skip to content
Wonsup Yoon edited this page Apr 3, 2024 · 4 revisions

When implementing timeouts (e.g. retransmission time out), you have to use timers. In KENS, there is TimerModule class for the purpose. Use the addTimer method to set a new timer and cancel it via the cancelTimer method. After the timeAfter duration (nanoseconds), which is a parameter of addTimer, the timerCallback method in TCPAssignment.cpp is called.

Note that payload's type is std::any. Check std::any to learn how to use std::any class.

Clone this wiki locally