the imaginary scenario:
there event loop (epoll) based processa sends requests on network processb runs on different machine. processa starts timer asynchronously , waits 10 seconds before giving waiting response processb. if response processb arrives within 10 seconds timer stopped.
the question how implement asynchronous timer in c on linux system?
use select (http://linux.die.net/man/2/select) on file descriptor reading response. system call enables 1 have timeout
Comments
Post a Comment