Project

General

Profile

Feature #11076

SELECT ... AS _websocket

Added by Carsten Rose about 2 months ago. Updated about 2 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Target version:
Start date:
27.08.2020
Due date:
% Done:

0%

Estimated time:
Discuss:

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:

Associated revisions

Revision 28b461fe (diff)
Added by Carsten Rose about 2 months ago

Refs #11076. First implementation of websocket (without wss/ssl)

Revision 52e182cc (diff)
Added by Carsten Rose about 2 months ago

Refs #11076. Decode answer respecting websocket definition. Start add documentation.

Revision 5033bcc2 (diff)
Added by Carsten Rose about 2 months ago

Refs #11076. remove doc changes

Revision f07a0c9d (diff)
Added by Carsten Rose about 2 months ago

Refs #11076. Add doc to websocket

Revision 505c4e35 (diff)
Added by Carsten Rose about 2 months ago

Refs #11076. Activates 'ssl' for 'wss' sockets.

Revision 923125ae (diff)
Added by Carsten Rose about 2 months ago

Refs #11076. Reports a bit more error messages.

History

#1 Updated by Carsten Rose about 2 months ago

  • Description updated (diff)

#2 Updated by Carsten Rose about 2 months ago

  • Tracker changed from Support to Feature

#3 Updated by Carsten Rose about 2 months 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

#4 Updated by Carsten Rose about 2 months 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}}="  

#5 Updated by Carsten Rose about 2 months ago

  • Description updated (diff)

Also available in: Atom PDF