lemmingzshadow/php-websocket — pull request #5 by dominics (2012-06-05 11:53:56+00:00)
Title: Adds a connection factory method to the server

Abstracting the creation of connection objects to a protected method is nicer for `WebSocket\Server` subclasses. Subclasses can override `createConnection()` to replace the Connection class.

Without this abstraction, the `Server` and `Connection` classes are tightly coupled, and the whole lengthy `run()` method would need to be copy-pasted into the subclass to use a different `Connection` class.