Skip to content

Commit

Permalink
websocket: aligned example statements
Browse files Browse the repository at this point in the history
- few more details about return code of handshake process

(cherry picked from commit d33ee59)
(cherry picked from commit 0327674)
  • Loading branch information
miconda committed Dec 4, 2018
1 parent 9883fbc commit 35204e8
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/modules/websocket/doc/websocket_admin.xml
Expand Up @@ -90,13 +90,13 @@ event_route[xhttp:request] {
# Optional... perform HTTP authentication
# ws_handle_handshake() exits (no further configuration file
# processing of the request) when complete.
# processing of the request) when complete in case of failure.
if (ws_handle_handshake())
{
# Optional... cache some information about the
# successful connection
exit;
}
{
# Optional... cache some information about the
# successful connection
exit;
}
}
xhttp_reply("404", "Not found", "", "");
Expand Down Expand Up @@ -181,9 +181,9 @@ route[WITHINDLG] {
onreply_route[WS_REPLY] {
if (nat_uac_test(64)) {
# Do NAT traversal stuff for replies to a WebSocket connection
# - even if it is not behind a NAT!
# - even if it is not behind a NAT!
# This won't be needed in the future if Kamailio and the
# WebSocket client support Outbound and Path.
# WebSocket client support Outbound and Path.
add_contact_alias();
}
}
Expand Down Expand Up @@ -491,7 +491,8 @@ end
<para>This function can be used from ANY_ROUTE (but will only
work in <emphasis>event_route[xhttp:request]</emphasis>).</para>
<note><para>This function returns 0, stopping all further
processing of the request, when there is a problem.</para></note>
processing of the request, when there is a problem. Otherwise, it
returns 1 (or positive number) in case of success.</para></note>
<example>
<title><function>ws_handle_handshake</function> usage</title>
<programlisting format="linespecific">
Expand Down

0 comments on commit 35204e8

Please sign in to comment.