From 7534023708d46ea526060db785b8065da963380f Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Tue, 15 Nov 2011 11:08:38 -0500 Subject: [PATCH] Documentation --- README.md | 7 +++++++ lib/Ratchet/Application/WebSocket/App.php | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 03d44bd..8bb6ff3 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/lib/Ratchet/Application/WebSocket/App.php b/lib/Ratchet/Application/WebSocket/App.php index 31f633b..d832420 100644 --- a/lib/Ratchet/Application/WebSocket/App.php +++ b/lib/Ratchet/Application/WebSocket/App.php @@ -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]) {