This changeset adds support for listening on existing file descriptors (FDs) with the SocketServer:
$socket = new React\Socket\SocketSever('php://fd/3');
The implementation and test suite is pretty straight forward and somewhat similar to the existing TcpServer and UnixServer except for the constructor using fopen('php://fd/3', 'r') to duplicate an existing file descriptor instead of creating a new socket server. Most of the work went into error reporting across different platforms and properly validating the given file descriptor with the limited low-level functions provided by PHP (which applies some private logic from https://github.com/clue/fd with permission). The test suite has 100% code coverage and should work on all platforms that support file descriptors and access to /dev/fd (which includes Linux and Mac and excludes Windows).
Builds on top of error reporting introduced via #266 and #267
Resolves / closes #164