diff options
| author | Shulhan <m.shulhan@gmail.com> | 2019-12-04 23:33:28 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2019-12-04 23:59:13 +0700 |
| commit | 738e4bbf515fed9a33430d9c474715dce242d338 (patch) | |
| tree | 3320d3999dc7e9157e1c8d9221980bb79e2c30f2 /lib/websocket/examples | |
| parent | eaf16a54fcb430885578c03e4e246af14966f033 (diff) | |
| download | pakakeh.go-738e4bbf515fed9a33430d9c474715dce242d338.tar.xz | |
websocket: update documentation of AUTOBAHN and on examples
Diffstat (limited to 'lib/websocket/examples')
| -rw-r--r-- | lib/websocket/examples/README.html | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/lib/websocket/examples/README.html b/lib/websocket/examples/README.html new file mode 100644 index 00000000..71aec923 --- /dev/null +++ b/lib/websocket/examples/README.html @@ -0,0 +1,90 @@ +<!DOCTYPE html> +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="theme-color" content="#375EAB" /> + + <title></title> + </head> + <body> + <div class="topbar"> + <div class="container"> + <div class="top-heading"> + <a href="/">github.com/shuLhan/share</a> + </div> + <div class="menu"> + <a href="https://godoc.org/github.com/shuLhan/share">GoDoc</a> + </div> + <div class="menu"> + <a href="/CHANGELOG.html">Changelog</a> + </div> + </div> + </div> + + <div class="page"> + <div class="container"> + <h1></h1> + <div class="sect1"> +<h2 id="_websocket_examples">WebSocket examples</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>This package contains an example of chat server and client written using +WebSocket.</p> +</div> +<div class="paragraph"> +<p>To run the WebSocket server, go to directory "cmd/server" and execute,</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre>$ go run .</pre> +</div> +</div> +<div class="paragraph"> +<p>There are three known user in the server: "Groot", "Thanos", and "Hulk"; all +of them are represented by ID 1, 2, and 3; in order.</p> +</div> +<div class="paragraph"> +<p>The client example is in directory "cmd/client", go to that directory and +connect to the server as user "Groot" by executing</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre>$ go run . 1</pre> +</div> +</div> +<div class="paragraph"> +<p>or as user "Thanos",</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre>$ go run . 2</pre> +</div> +</div> +<div class="paragraph"> +<p>or as user "Hulk",</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre>$ go run . 2</pre> +</div> +</div> +<div class="paragraph"> +<p>Run the server and then two or three clients, and start chatting with each +others.</p> +</div> +</div> +</div> + </div> + + </div> + + + <div class="footer"> + Copyright 2019, Shulhan <ms@kilabit.info>. All rights reserved. + <br /> + Use of this source code is governed by a BSD-style license that can be + found in the <a href="/LICENSE">LICENSE</a> file. + </div> + </body> +</html> |
