SO_SNDLOWAT not avalaible; how can i avoid non-blocking sockets

przemas_r at o2.pl przemas_r at o2.pl
Wed Nov 24 12:03:43 EST 2004


Hi all!

I'm writing socket app, which will transmit data in fixed size packets.
I'd like to be able to pass N bytes to send (or write) function and
ensure that it won't block.

I was willing to set SO_SNDLOWAT option properly and use select to avoid
blocking send. On linux it's impossible, because SO_SNDLOWAT option is
unavailable. After one hour fruitless googling and newsgroup browsing I
had to give up.

I know I can achieve desirable effect by using non-blocking sockets. But
due to its CPU-consuming nature I treat it as last resort.

--
Przemysław Różycki



More information about the Python-list mailing list