Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96924

Re: Lightwight socket IO wrapper

From Michael Ströder <michael@stroeder.com>
Newsgroups comp.lang.python
Subject Re: Lightwight socket IO wrapper
Date 2015-09-21 10:29 +0200
Organization A noiseless patient Spider
Message-ID <mtof26$j1p$1@dont-email.me> (permalink)
References (1 earlier) <20150921015514.GA70236@cskk.homeip.net> <mailman.17.1442803211.28679.python-list@python.org> <876134e683.fsf@elektro.pacujo.net> <mto9ud$2ui$1@dont-email.me> <87a8sgp5ln.fsf@elektro.pacujo.net>

Show all headers | View raw


Marko Rauhamaa wrote:
> Michael Ströder <michael@stroeder.com>:
> 
>> Marko Rauhamaa wrote:
>>> I recommend using socket.TCP_CORK with socket.TCP_NODELAY where they
>>> are available (Linux).
>>
>> If these options are not available are both option constants also not
>> available? Or does the implementation have to look into sys.platform?
> 
>    >>> import socket
>    >>> 'TCP_CORK' in dir(socket)
>    True

On which platform was this done?

To rephrase myquestion:
How to automagically detect whether TCP_CORK is really available on a platform?

'TCP_CORK' in dir(socket)
or catch AttributeError

sys.platform=='linux2'
hoping that Linux 2.1 or prior is not around anymore...

...

Ciao, Michael.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Lightwight socket IO wrapper Chris Angelico <rosuav@gmail.com> - 2015-09-21 12:40 +1000
  Re: Lightwight socket IO wrapper Marko Rauhamaa <marko@pacujo.net> - 2015-09-21 07:39 +0300
    Re: Lightwight socket IO wrapper Chris Angelico <rosuav@gmail.com> - 2015-09-21 14:48 +1000
      Re: Lightwight socket IO wrapper Marko Rauhamaa <marko@pacujo.net> - 2015-09-21 09:56 +0300
    Re: Lightwight socket IO wrapper Michael Ströder <michael@stroeder.com> - 2015-09-21 09:02 +0200
      Re: Lightwight socket IO wrapper Marko Rauhamaa <marko@pacujo.net> - 2015-09-21 10:57 +0300
        Re: Lightwight socket IO wrapper Michael Ströder <michael@stroeder.com> - 2015-09-21 10:29 +0200
          Re: Lightwight socket IO wrapper Marko Rauhamaa <marko@pacujo.net> - 2015-09-21 11:47 +0300
            Re: Lightwight socket IO wrapper MRAB <python@mrabarnett.plus.com> - 2015-09-21 13:26 +0100

csiph-web