I have a server running which accepts connections from clients and gets the data from them and puts it on a message queue. This has been running fine on AIX boxes till now. I am trying to port this code to Linux. The alarms aren't working as expected. When I accept a connection from a client, I use read() function to read the data from the socket. Now since alarms aren't working as expected on Linux is there a way to set a timeout in the read().
After accepting the connection I just want to read the data only till a certain time after which i would like to drop the client. Is there a way to do this?
Thanks...
After accepting the connection I just want to read the data only till a certain time after which i would like to drop the client. Is there a way to do this?
Thanks...