You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've attempted to use your package to set up a simple server to print a message, hello. I have failed to get any output on the console or in the browser. My code appears as follows:
$server = newRx\Websocket\Server('127.0.0.1:8020');
$server->subscribe(
function (Rx\Websocket\MessageSubject$subject) {
$subject->subscribe(
function ($message) {
echo$message . PHP_EOL;
}
);
$sayHello = function () use ($subject) {
$subject->onNext('Hello');
};
$sayHello();
\EventLoop\addPeriodicTimer(5, $sayHello);
},
function ($error) {
echo"Connection Error";
},
function () {
echo"Completed";
}
);
I do however get a 500 server error.
The text was updated successfully, but these errors were encountered:
Hello,
I've attempted to use your package to set up a simple server to print a message, hello. I have failed to get any output on the console or in the browser. My code appears as follows:
I do however get a 500 server error.
The text was updated successfully, but these errors were encountered: