Verified Commit 1e5e304f authored by Aral Balkan's avatar Aral Balkan
Browse files

Provide direct link to basic WebSocket chat server example

parent 514282e8
......@@ -178,7 +178,7 @@ module<span class="token punctuation">.</span><span class="token function-variab
webSocket<span class="token punctuation">.</span><span class="token function-variable function">onmessage</span> <span class="token operator">=</span> console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span>message<span class="token punctuation">.</span>data<span class="token punctuation">)</span>
webSocket<span class="token punctuation">.</span><span class="token function">send</span><span class="token punctuation">(</span><span class="token string">'hello'</span><span class="token punctuation">)</span></code></pre>
<p>Note that this is a naïve implementation that sends messages to every client, including the one the message originated on. For a demonstration of a basic chat server that has rudimentary client filtering and supports selective broadcast (to create “rooms”), see <a href='https://source.ind.ie/site.js/app/tree/master/examples/wss-basic-chat'>the source code for the Basic Chat example.</a></p>
<p>Note that this is a naïve implementation that sends messages to every client, including the one the message originated on. For a demonstration of a basic chat server that has rudimentary client filtering and supports selective broadcast (to create “rooms”), see <a href='https://source.ind.ie/site.js/app/blob/master/examples/wss-basic-chat/.dynamic/.wss/chat.js'>the source code for the Basic Chat example.</a></p>
<p>To run that example with a basic web interface, do the following and then visit <a href='https://localhost'>https://localhost</a></p>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment