I'm implementing a TCP protocol. TCP implementation requires to send packets continuously and if the receiver doesnt respond after a particular interval of time it should resend the packet again. I need some method to implement a timer expiry function. How can I implement it?? Should i implement threads (If yes can you please give a sample)? or is there any better method?
Btw I'm implementing it in a Unix system