[Python-ideas] Supporting already opened sockets in our socket-based server classes (original) (raw)
Tarek Ziadé tarek at ziade.org
Wed Jun 6 17:23:15 CEST 2012
- Previous message: [Python-ideas] Supporting already opened sockets in our socket-based server classes
- Next message: [Python-ideas] Supporting already opened sockets in our socket-based server classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 6/6/12 2:28 PM, Antoine Pitrou wrote:
Le 06/06/2012 09:56, Tarek Ziadé a écrit :
What I am proposing is the following syntax: if the host passed to the class is of the form: fd://12 The class will try to create a socket object against the file descriptor 12, and will not bind() it neither accept() it. Passing a pseudo-URL where a host name is expected sounds like a bad idea.
Well, unix sockets are using this convention to point paths to unix sockets.
e.g. unix:///some/path
in general, theURI scheme seems widely used out there,
https://en.wikipedia.org/wiki/URI_scheme
What do you propose ? another option ?
Also, I don't understand the "neither accept() it" part. Surely you need to accept() incoming connections, so perhaps you mean "neither listen() it"? Yeah that was a typo -- I do listen() before I fork
(also, I'm not sure calling listen() another time is a problem)
I don't think so, but the usual pattern I have seen is to call listen() before the forking
Regards Antoine.
Python-ideas mailing list Python-ideas at python.org http://mail.python.org/mailman/listinfo/python-ideas
- Previous message: [Python-ideas] Supporting already opened sockets in our socket-based server classes
- Next message: [Python-ideas] Supporting already opened sockets in our socket-based server classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]