[Python-ideas] PEP 3156: getting the socket or peer name from the transport

Antoine Pitrou solipsis at pitrou.net
Sun Jan 27 12:21:21 CET 2013


On Sun, 27 Jan 2013 10:16:14 +0200
Yuval Greenfield <ubershmekel at gmail.com>
wrote:
> From http://en.wikipedia.org/wiki/Berkeley_sockets#Options_for_sockets
> 
> > Options for sockets
> >
> > After creating a socket, it is possible to set options on it. Some of the
> more common options are:
> >
> > TCP_NODELAY disables the Nagle algorithm.
> > SO_KEEPALIVE enables periodic 'liveness' pings, if supported by the OS.
> 
> Though these may not be the concern of a protocol as defined by PEP 3156.

How about e.g. TCP_CORK?

> > Would that be reasonable to expect
> > from a protocol written to be independent of the specific transport
> > type?
> >
> >
> Most protocols should be written independent of transport. But it seems to
> me that a user might write an entire app as a "protocol".

Well, such an assumption can fall flat. For example, certificate
checking in HTTPS expects that the transport is some version of TLS or
SSL: http://tools.ietf.org/html/rfc2818.html#section-3.1

Regards

Antoine.





More information about the Python-ideas mailing list