Closed shizzic closed 1 year ago
And yes, i have a right version of workerman "workerman/workerman": "^4.0",
Please remove the code:
$worker->onConnect = function ($connection) { $connection->send('connected'); }; $worker->onError = function ($connection) { $connection->send('error'); };
Then open your browser console and enter the following JS code:
var source = new EventSource('https://domain:8090');
source.addEventListener('message', function (event) {
var data = event.data;
console.log(data); // print hello
}, false);
Nothing changed
start.php:
js code and sse response:
workerman version:
start.php:
js code and sse response:
workerman version:
Thank you, it was my problem with untachhed port, so i changed it on available and it worked.
That's how i tried to connect
So, basically i can't connect to this event server and keep getting this error "GET https://domain:8090/ net::ERR_CONNECTION_TIMED_OUT" with no status in response at all. It's your only code instance with sse implementation i found. It's cross-domain and on the other hand i successfully connected to websocket server on the same domain. There is no issue with paths to certificates (i checked) and no fatal error at all. Log files don't show anything. So i just can't connect.