From 07f5d49996957b743242fcc050b56d5dbe0eaf5d Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Fri, 28 Oct 2011 14:20:25 -0400 Subject: [PATCH] Readme Updated the README file to reflect application structure changes --- README.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1e2e612..dd78ac3 100644 --- a/README.md +++ b/README.md @@ -14,27 +14,31 @@ Ratchet (so far) includes an "application" (in development) to handle the WebSoc _server = $server; } - public function handleMessage() { + public function onOpen(Sock $conn) { } - public function handleClose() { + public function onRecv(Sock $from, $msg) { + } + + public function onClose(Sock $conn) { } } - $protocol = new \Ratchet\Protocol\WebSocket(); - $application = new MyApp(); - $server = new \Ratchet\Server(\Ratchet\Socket::createFromConfig($protocol)); - - $server->attatchReceiver($protocol); - $server->attatchReceiver($application); - - $server->run(); \ No newline at end of file + $server = new Server(new Socket, new WebSocket(new MyApp)); + $server->run('0.0.0.0', 80); \ No newline at end of file