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