in reply to Shutdown a thread that is using a blocking socket
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
|
|---|