Pylons/waitress — pull request #20 by kgaughan (2013-05-12 00:43:48+00:00)
Title: Unix domain socket support

And here's the second pull request, the one that actually adds Unix domain socket support and closes #8. There are a couple important issues I have to bring up with the changes.

First and most important is that it changes WSGIServer from a class to a factory function. This may or may not be considered a breaking change. I don't think it should break anything, but there's a chance it might. I tried a few different approaches (others being mingling support for both types of socket within the WSGIServer class itself, and having classes that isolated socket-specific behaviour in their own classes which instances of WSGIServer called). The factory and subclasses approach I ended up taking ended up being the cleanest code-wise, but if you feel WSGIServer should remain a class, I'll rejig things to isolate the socket-specific behaviour instead.

The other is the addition of the send_check_error() method in the tests. This was added because I noticed that whereas Inet sockets would not trigger an EPIPE if closed and send() was used on them, Unix sockets consistently would. This method isolates that behaviour.