Implements low level logic for connecting, serving, reading to, and
writing from WebSocket connections using PHP's streams.
Unlike in previous versions of this library, a Socket instance now
represents a single underlying socket resource. It's designed to be used
by aggregation, rather than inheritance.