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
Hello - I have been trying to get web sockets working with this for the last few days - specifically url's such as "wss://cerberus-xxxx.lb.slack-msgs.com/websocket/KHAM3gifDwkNzSW1epUuKursfVk...". Is this type of url supported? It seems that it does not work but also does not return any errors.
As mentioned, react/socket implements raw sockets while WebSockets is a network protocol on top of TCP/IP sockets and uses HTTP as initial handshake. You should check out Pawl and WebSocketMiddleware for websocket client and server respectively. Or Ratchet for a higher level websocket server.
They all build on top of ReactPHP to implement websockets.
Hello - I have been trying to get web sockets working with this for the last few days - specifically url's such as "wss://cerberus-xxxx.lb.slack-msgs.com/websocket/KHAM3gifDwkNzSW1epUuKursfVk...". Is this type of url supported? It seems that it does not work but also does not return any errors.
I have the following code:
$loop = Factory::create();
$connector = new Connector($loop);
$connector->connect($url)->then(function (ConnectionInterface $connection) use ($loop) {
$connection->pipe(new WritableResourceStream(STDOUT, $loop));
$connection->write('{
"type": "message",
"ts": "11111",
"user": "noone",
"text": "sample text"
}');
});
$loop->run();
Thank you!
The text was updated successfully, but these errors were encountered: