Fixed errors in examples
This commit is contained in:
@ -30,9 +30,9 @@ $websocket = new NoccyLabs\React\WebSocket\WebSocketMiddleware();
|
||||
|
||||
// Connect event handler, receives a WebSocketInterface.
|
||||
// Ratchet handles security for you, this library does not. You should
|
||||
// check everything important in the connect handdler and reject anything
|
||||
// check everything important in the connect handler and reject anything
|
||||
// that does not smell right. Here we just echo everything.
|
||||
$websocket->on('connect', function (NoccyLabs\React\WebSocket\WebSocketInterface $connection) {
|
||||
$websocket->on('connection', function (NoccyLabs\React\WebSocket\WebSocketInterface $connection) {
|
||||
$websocket->on('text', function ($text) use ($websocket) {
|
||||
$websocket->write($text);
|
||||
});
|
||||
|
Reference in New Issue
Block a user