Actions
Feature #11076
openSELECT ... AS _websocket
Start date:
27.08.2020
Due date:
% Done:
0%
Estimated time:
Discuss:
Prio Planung:
Vote:
Description
Es soll moeglich sein via QFQ Daten zu einem Websocket zu senden und die Antwort abzufragen.
Benoetigt von SeminarLive um den MeetingManager IDs zu uebermitteln oder abzufragen.
Notation:
SELECT 'w:wss://antmedia.math.uzh.ch:6334/test|t:<payload>|lifetime:one' AS '_link|response1'
Evtl: Connection offen halten, persistent (resue innerhalb eines QFQ Laufes, oder via PHP Session ueber Stunden.
Library:
- https://github.com/bloatless/php-websocket - fuer den Client nur eine Datei.
- https://github.com/Textalk/websocket-php/ - scheint min. beim Client auch 'wss' zu unterstuetzen.
Related issues
Updated by Carsten Rose over 3 years ago
- Tracker changed from Support to Feature
Updated by Carsten Rose over 3 years ago
- Status changed from New to In Progress
Test: https://github.com/bloatless/php-websocket
[root@webwork16] $ cd /var/www/html/crose/php-websocket $ git clone https://github.com/bloatless/php-websocket $ cd php-websocket/cli # Localhost ersetzen gegen 'webwork16' resp. '0.0.0.0' damit auch die Browseranwendungen funktionieren client_demo.php: $clients[$i]->connect('192.168.133.84', 8000, '/demo', 'webwork16.math.uzh.ch'); server.php: $server->setAllowedOrigin('webwork16.math.uzh.ch'); server.php: $server = new \Bloatless\WebSocket\Server('0.0.0.0', 8000); # Websocket Server starten $ php server.php # Status URL: http://webwork16.math.uzh.ch/crose/php-websocket/public/status.html # Test URL: http://webwork16.math.uzh.ch/crose/php-websocket/public/index.html Action: echo Data: asljflaskjflasjfdlksaj
Updated by Carsten Rose over 3 years ago
# save socket answer in {{col1}}, no output in 10.sql 10.sql = SELECT 'w:ws://webwork16.math.uzh.ch:8000/demo|t:{"action":"echo","data":"hello world"}' AS '_websocket|col1|_hide' # Access socket answer via {{&col1:R}} ... the '&..' is necessary to access the answer/result, not the control string. 20.sql = SELECT "<br><br>-{{&col1:R}}="
Updated by Carsten Rose over 1 year ago
- Related to Feature #13354: Using Websocket in QFQ added
Actions