socket.rcv timeout while-loop

Jean-Michel Pichavant jeanmichel at sequans.com
Fri Feb 4 05:52:06 EST 2011


Stephen Hansen wrote:
> On 2/3/11 9:56 AM, Dwayne Blind wrote:
>   
>> However I would like to set timeout on the socket rcv method, so that
>> the while loop stops exactly after 3 seconds. Is this possible ?
>>     
>
> I rarely do low-level socket stuff -- [snip]
>
>   
Good point. Python has a module for almost anything you would need to do 
on a network. Make sure none of these modules fit your needs.
You could tell us what you want to achieve at a higher level, we may 
point you to a already existing module.

Some of these modules are life saver, as I personnally always wrote 
buggy netcode for whatever reason :(

JM



More information about the Python-list mailing list