You can use alarm function. In that function You can just pass time parameters after which you can raise a signal and handle it in your code.
My advice is that in Network programming don't use Block mode reading or opening Socket files.
you can use poll or select function in Network programmings
In reply to Re: Shutdown a thread that is using a blocking socket
by jesuashok
in thread Shutdown a thread that is using a blocking socket
by chrism01
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |