Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
52e182cc
Commit
52e182cc
authored
Sep 02, 2020
by
Carsten Rose
Browse files
Refs #11076. Decode answer respecting websocket definition. Start add documentation.
parent
28b461fe
Pipeline
#3745
canceled with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Documentation/Report.rst
View file @
52e182cc
...
...
@@ -714,7 +714,9 @@ Column: _link
|x | |Copy to |y:[some content] |y:this will be copied |Click on it copies the value of 'y:' to the clipboard. Optional a file ('F:...') might be specified as source. |
| | |clipboard | | |See :ref:`copyToClipboard`. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Dropdown menu |z |z||p:home|t:Home |Creates a dropdown menu. SEe :ref:`dropdownMenu`. |
| | |Dropdown menu |z |z||p:home|t:Home |Creates a dropdown menu. See :ref:`dropdownMenu`. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |websocket |w:ws://
<host>
:
<port>
/
<path>
| w:ws://localhost:123/demo |Send message given in 't:...' to websocket. See :ref:`websocket`. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Text |t:
<text>
|t:Firstname Lastname | |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
...
...
@@ -2183,6 +2185,36 @@ Line 6: A PDF download.
Line
7
:
A
disabled
menu
entry
.
..
_websocket
:
WebSocket
---------
Sending
messages
via
WebSocket
and
receiving
the
answer
is
done
via
:
::
SELECT
'
w
:ws
://<
host
>:<
port
>/<
path
>|
t
:<
message
>
' AS _websocket
Instead of '
...
AS
_websocket
' it'
s
also
possible
to
use
'... AS _link'
.
<
dropdown
menu
symbol
options
>||<
menu
entry
1
>||<
menu
entry
2
>||...
10
.sql
=
SELECT
CONCAT
(
'w:ws://example.com:8000/demo|t:{"action":"echo","data":"hello world'
,
f
.id
,
'"}'
)
AS
'_websocket'
,
CONCAT
(
'w:ws://webwork16.math.uzh.ch:8000/demo|t:{"action":"echo","data":"good morning'
,
f
.id
,
'"}'
)
AS
'_websocket|col2|_hide'
,
CONCAT
(
'w:ws://webwork16.math.uzh.ch:8000/demo|t:{"action":"echo","data":"good evening'
,
f
.id
,
'"}'
)
AS
'_websocket|col3|_hide'
FROM
Form
AS
f
ORDER
BY
f
.id
LIMIT
3
#20
.sql
=
SELECT
'w:ws://webwork16.math.uzh.ch:8000/demo|t:{"action":"ping","data":"my ping"}'
AS
'_websocket|col1'
,
'Datetime: '
,
NOW
()
10
.
20
.sql
=
SELECT
"
<
br
><
br
>
-
{
{&
col1
:
R
}
}
/
{
{&
col2
:
R
}
}
/
{
{&
col3
:
R
}
}
=
"
.. _drag_and_drop:
Drag and drop
...
...
extension/Classes/Core/Report/WebSocket.php
View file @
52e182cc
...
...
@@ -85,9 +85,10 @@ class WebSocket {
$answer
.
=
$buffer
;
}
// It seems we have two control characters at the beginning: don't understand why.
if
(
ord
(
$answer
[
0
])
==
129
)
{
$answer
=
substr
(
$answer
,
2
);
// Decode WebSocket answer
if
(
$answer
!==
''
)
{
$data
=
$this
->
hybi10Decode
(
$answer
);
$answer
=
$data
[
'payload'
];
}
return
$answer
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment