Documentation

This commit is contained in:
Chris Boden 2011-11-15 11:08:38 -05:00
parent 9d36a37bf5
commit 7534023708
2 changed files with 9 additions and 2 deletions

View File

@ -21,6 +21,13 @@ A demonstration of this will be posted (eventually).
See https://github.com/cboden/socket-demos for some out-of-the-box working demos using Ratchet.
###Future considerations
Ideally, soon, web servers will start supporting WebSockets to some capacity and PHP will no longer need to run its self from the command line.
In theory, the server (Apache/Nginx/ISS) would recognize the HTTP handshake request to upgrade the protocol to WebSockets and run/pass data through to a user
configured PHP file. When this happens, in theory, you can keep your script the same, just remove the Server Application wrapper and maybe eventually the
WebSocket Application wrapper if the servers recognize the protocol message framing.
---
###A quick server example

View File

@ -141,7 +141,7 @@ class App implements ApplicationInterface, ConfiguratorInterface {
/**
* @param array of HTTP headers
* @return WebSocket\Version\VersionInterface
* @return Version\VersionInterface
*/
protected function getVersion($message) {
$headers = HTTP::getHeaders($message);
@ -158,7 +158,7 @@ class App implements ApplicationInterface, ConfiguratorInterface {
}
/**
* @return WebSocket\Version\VersionInterface
* @return Version\VersionInterface
*/
protected function versionFactory($version) {
if (null === $this->_versions[$version]) {