Re: Question on Socket Timeouts

2012-11-18 Thread Cameron Simpson
On 19Nov2012 14:40, I wrote: | Not the time you set up the socket, or when you accept the client's | connection. Thereafter, ever time you get some data, look at the clock. | If enough time has elapsed, close the socket yourself. That would be "Note", not "Not". Sorry. -- Cameron Simpson No key

Re: Question on Socket Timeouts

2012-11-18 Thread Abhijeet Mahagaonkar
I also tried looking at SO_RCVTIMEO option. Turns out that also resets if data is received. And yeah I implemented that as a separate logic in my code. I was wondering if sockets natively provided this functionality. Thanks again for clarifying. Cheers, Abhijeet On Mon, Nov 19, 2012 at 12:40 A

Re: Question on Socket Timeouts

2012-11-18 Thread Cameron Simpson
On 18Nov2012 03:27, Abhijeet Mahagaonkar wrote: | I'm new to network programming. | I have a question. | | Can we set a timeout to limit how long a particular socket can read or | write? On the socket itself? Probably not. But... | I have used a settimeout() function. | The settimeout() works f

Question on Socket Timeouts

2012-11-18 Thread Abhijeet Mahagaonkar
Hi all, I'm new to network programming. I have a question. Can we set a timeout to limit how long a particular socket can read or write? I have used a settimeout() function. The settimeout() works fine as long as the client doesnt send any data for x seconds. The data that I receive in the serve