Re: socket read timeout

2007-04-03 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: > > Right, but collisions are *so* twentieth-century, aren't they. With a > properly-implemented switched infrastructure Ethernet interfaces can > transmit and receive at the same time. This is true, while "A" and "B" are not simultaneously trying to

Re: socket read timeout

2007-04-02 Thread Steve Holden
Bryan Olson wrote: > Steve Holden wrote: >> Hendrik van Rooyen wrote: >>> Are sockets full duplex? >>> >> Yes. But you have to use non-blocking calls in your application to use >> them as full-duplex in your code. > > Hmmm... I'm missing something. Suppose I have one thread (or > process) reading

Re: socket read timeout

2007-04-02 Thread Steve Holden
Hendrik van Rooyen wrote: > "Steve Holden" <[EMAIL PROTECTED]> > > >> Hendrik van Rooyen wrote: >>> <[EMAIL PROTECTED]> wrote: >>> >>> hg> My issue with that is the effect on write: I only want a timeout on hg> read ... but anyway ... So set a long timeout when you

Re: socket read timeout

2007-04-01 Thread Hendrik van Rooyen
"Bryan Olson" <[EMAIL PROTECTED]> wrote: > Steve Holden wrote: > > Hendrik van Rooyen wrote: > >> Are sockets full duplex? > >> > > Yes. But you have to use non-blocking calls in your application to use > > them as full-duplex in your code. > > Hmmm... I'm missing something. Suppose I have one

Re: socket read timeout

2007-04-01 Thread Bryan Olson
Steve Holden wrote: > Hendrik van Rooyen wrote: >> Are sockets full duplex? >> > Yes. But you have to use non-blocking calls in your application to use > them as full-duplex in your code. Hmmm... I'm missing something. Suppose I have one thread (or process) reading from a blocking-mode socket whi

Re: socket read timeout

2007-04-01 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> > Hendrik van Rooyen wrote: > > <[EMAIL PROTECTED]> wrote: > > > > > >> hg> My issue with that is the effect on write: I only want a timeout on > >> hg> read ... but anyway ... > >> > >> So set a long timeout when you want to write and short timeout w

Re: socket read timeout

2007-04-01 Thread Steve Holden
Hendrik van Rooyen wrote: > <[EMAIL PROTECTED]> wrote: > > >> hg> My issue with that is the effect on write: I only want a timeout on >> hg> read ... but anyway ... >> >> So set a long timeout when you want to write and short timeout when you want >> to read. >> > > Are sockets full du

Re: socket read timeout

2007-03-30 Thread Jean-Paul Calderone
On Fri, 30 Mar 2007 08:22:18 +0200, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: >"Jean-Paul Calderone" <[EMAIL PROTECTED]> wrote: > >> On Thu, 29 Mar 2007 07:29:35 +0200, Hendrik van Rooyen ><[EMAIL PROTECTED]> wrote: > >> >Are sockets full duplex? >> >> Uh, yes. > >The reason I asked is that I

Re: socket read timeout

2007-03-30 Thread Hendrik van Rooyen
"Jean-Paul Calderone" <[EMAIL PROTECTED]> wrote: > On Thu, 29 Mar 2007 07:29:35 +0200, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > >Are sockets full duplex? > > Uh, yes. The reason I asked is that I have noticed that other file like objects (on Suse 10 Linux and Python 2.4 out of the box) ar

Re: socket read timeout

2007-03-29 Thread Damjan
>> So set a long timeout when you want to write and short timeout when you >> want to read. >> > > Are sockets full duplex? > > I know Ethernet isn't. Both are full duplex. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: socket read timeout

2007-03-29 Thread Jean-Paul Calderone
On Thu, 29 Mar 2007 07:29:35 +0200, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> wrote: > > >> >> hg> My issue with that is the effect on write: I only want a timeout on >> hg> read ... but anyway ... >> >> So set a long timeout when you want to write and short time

Re: socket read timeout

2007-03-28 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > > hg> My issue with that is the effect on write: I only want a timeout on > hg> read ... but anyway ... > > So set a long timeout when you want to write and short timeout when you want > to read. > Are sockets full duplex? I know Ethernet isn't. - Hend

Re: socket read timeout

2007-03-28 Thread hg
[EMAIL PROTECTED] wrote: > > hg> My issue with that is the effect on write: I only want a timeout > on > hg> read ... but anyway ... > > So set a long timeout when you want to write and short timeout when you > want to read. > > Skip Not bad .. thanks -- http://mail.python.org

Re: socket read timeout

2007-03-28 Thread skip
hg> My issue with that is the effect on write: I only want a timeout on hg> read ... but anyway ... So set a long timeout when you want to write and short timeout when you want to read. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: socket read timeout

2007-03-28 Thread Steve Holden
hg wrote: > Facundo Batista wrote: > >> hg wrote: >> >>> Do you mean use select ? >> No, socket's timeout: >> > import socket > s = socket.socket() > s.settimeout(5) > ... >> Regards, >> >> -- >> . Facundo >> . >> Blog: http://www.taniquetil.com.ar/plog/ >> PyAr: http://www.pytho

Re: socket read timeout

2007-03-27 Thread hg
Facundo Batista wrote: > hg wrote: > >> Do you mean use select ? > > No, socket's timeout: > import socket s = socket.socket() s.settimeout(5) ... > > Regards, > > -- > . Facundo > . > Blog: http://www.taniquetil.com.ar/plog/ > PyAr: http://www.python.org/ar/ My issue

Re: socket read timeout

2007-03-27 Thread Facundo Batista
hg wrote: > Do you mean use select ? No, socket's timeout: >>> import socket >>> s = socket.socket() >>> s.settimeout(5) >>> ... Regards, -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ -- http://mail.python.org/mailman/listinfo/python-list

Re: socket read timeout

2007-03-27 Thread hg
Steve Holden wrote: > Jarek Zgoda wrote: >> hg napisa?(a): >> >>> I am looking for the most efficient / cleanest way to implement a socket >>> read with timeout (Windows mainly but would be great if the same code >>> worked under *nix) >> >> Did you see http://www.timo-tasi.org/python/timeoutsoc

Re: socket read timeout

2007-03-27 Thread skip
>> I am looking for the most efficient / cleanest way to implement a >> socket read with timeout (Windows mainly but would be great if the >> same code worked under *nix) Jarek> Did you see http://www.timo-tasi.org/python/timeoutsocket.py ? Also socket objects have timeout attrib

Re: socket read timeout

2007-03-27 Thread Steve Holden
Jarek Zgoda wrote: > hg napisał(a): > >> I am looking for the most efficient / cleanest way to implement a socket >> read with timeout (Windows mainly but would be great if the same code >> worked under *nix) > > Did you see http://www.timo-tasi.org/python/timeoutsocket.py ? > Note that since 2.

Re: socket read timeout

2007-03-27 Thread Jarek Zgoda
hg napisał(a): > I am looking for the most efficient / cleanest way to implement a socket > read with timeout (Windows mainly but would be great if the same code > worked under *nix) Did you see http://www.timo-tasi.org/python/timeoutsocket.py ? -- Jarek Zgoda "We read Knuth so you don't have

socket read timeout

2007-03-27 Thread hg
Hi, I am looking for the most efficient / cleanest way to implement a socket read with timeout (Windows mainly but would be great if the same code worked under *nix) Tanks, hg -- http://mail.python.org/mailman/listinfo/python-list