Documentation
This commit is contained in:
parent
9d36a37bf5
commit
7534023708
@ -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.
|
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
|
###A quick server example
|
||||||
|
@ -141,7 +141,7 @@ class App implements ApplicationInterface, ConfiguratorInterface {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array of HTTP headers
|
* @param array of HTTP headers
|
||||||
* @return WebSocket\Version\VersionInterface
|
* @return Version\VersionInterface
|
||||||
*/
|
*/
|
||||||
protected function getVersion($message) {
|
protected function getVersion($message) {
|
||||||
$headers = HTTP::getHeaders($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) {
|
protected function versionFactory($version) {
|
||||||
if (null === $this->_versions[$version]) {
|
if (null === $this->_versions[$version]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user