Adding client timeout for socket read/write