summaryrefslogtreecommitdiffstats
path: root/tools/simple-wsclient/src/site-docs/adoc/fragments/run-echo.adoc
diff options
context:
space:
mode:
authorDinh Danh Le <dinh.danh.le@ericsson.com>2018-08-22 12:41:50 +0100
committerDinh Danh Le <dinh.danh.le@ericsson.com>2018-08-22 22:19:38 +0100
commita5a4427b505a5b0d79bb394093c9d6f6395d9a1f (patch)
tree63e31fd0cadb956f2dcd87022cfbdfb89d122fc2 /tools/simple-wsclient/src/site-docs/adoc/fragments/run-echo.adoc
parente633cd8e2e4bd0dc20a8727a3c35eaacf00a136f (diff)
Add docs for tools package & update main apex-pdp
Change-Id: I2990157eb7bae51f7d38a652fd8dd488b7287cea Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com> Issue-ID: POLICY-867
Diffstat (limited to 'tools/simple-wsclient/src/site-docs/adoc/fragments/run-echo.adoc')
-rw-r--r--tools/simple-wsclient/src/site-docs/adoc/fragments/run-echo.adoc79
1 files changed, 79 insertions, 0 deletions
diff --git a/tools/simple-wsclient/src/site-docs/adoc/fragments/run-echo.adoc b/tools/simple-wsclient/src/site-docs/adoc/fragments/run-echo.adoc
new file mode 100644
index 000000000..213b4acbc
--- /dev/null
+++ b/tools/simple-wsclient/src/site-docs/adoc/fragments/run-echo.adoc
@@ -0,0 +1,79 @@
+//
+// ============LICENSE_START=======================================================
+// Copyright (C) 2016-2018 Ericsson. All rights reserved.
+// ================================================================================
+// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE
+// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode
+//
+// SPDX-License-Identifier: CC-BY-4.0
+// ============LICENSE_END=========================================================
+//
+// @author Sven van der Meer (sven.van.der.meer@ericsson.com)
+//
+
+== Run the Websocket Echo Client
+
+The echo client is included in an APEX full installation.
+To run the client, open a new shell (Unix, Cygwin) or command prompt (`cmd` on Windows).
+Then use the APEX application launcher to start the client.
+
+[IMPORTANT]
+.APEX engine needs to run first
+====
+The example assumes that an APEX engine configured for __produce__ carrier technology Websocket and __JSON__ event protocol is executed first.
+====
+
+
+[width="100%",options="header",cols="5a,5a"]
+|====================
+| Unix, Cygwin | Windows
+|
+[source%nowrap,sh]
+----
+# $APEX_HOME/bin/apexApps.sh ws-echo [args]
+----
+|
+[source%nowrap,bat]
+----
+> %APEX_HOME%\bin\apexApps.bat ws-echo [args]
+----
+|====================
+
+Use the following command line arguments for server and port of the Websocket server.
+The port should be the same as configured in the APEX engine.
+The server host should be the host on which the APEX engine is running
+
+- `-p` defines the Websocket port to connect to (defaults to `8887`)
+- `-s` defines the host on which a Websocket server is running (defaults to `localhost`)
+
+Let's assume that there is an APEX engine running, configured for produce Websocket carrier technology, as server, for port 42452, with produce event protocol JSON,.
+If we start the console client on the same host, we can omit the `-s` options.
+We start the console client as:
+
+[source%nowrap,bat]
+----
+# $APEX_HOME/bin/apexApps.sh ws-echo -p 42452 <1>
+> %APEX_HOME%\bin\apexApps.bat ws-echo -p 42452 <2>
+----
+<1> Start client on Unix or Cygwin
+<2> Start client on Windows
+
+Once started successfully, the client will produce the following messages (assuming we used `-p 42452` and an APEX engine is running on `localhost` with the same port:
+
+[source%nowrap,bat]
+----
+
+
+ws-simple-echo: starting simple event echo
+ --> server: localhost
+ --> port: 42452
+
+Once started, the application will simply print out all received events to standard out.
+Each received event will be prefixed by '---' and suffixed by '===='
+
+
+ws-simple-echo: opened connection to APEX (Web Socket Protocol Handshake)
+
+
+----
+