A simple PHP WebSocket implementation for PHP 5.3
PHP JavaScript
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit ahead, 50 commits behind nekudo:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
client
server
README.md

README.md

PHP WebSocket

A simple PHP WebSocket server and client. ATTENTION: Totally beta and just for testing/development!

  • Supports draft hybi-10
  • Application module, the server can be extended by custom behaviors

Server example

This creates a server on localhost:8000 with one Application that listens on ws://localhost:8000/echo:

$server = new \WebSocket\Server('localhost', 8000);
$server->registerApplication('echo', \WebSocket\Application\EchoApplication::getInstance());
$server->run();

Libraries used