4 Copyright (c) 2012 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file.
9 <meta http-equiv=
"Pragma" content=
"no-cache">
10 <meta http-equiv=
"Expires" content=
"-1">
11 <title>{{title}}
</title>
12 <script type=
"text/javascript" src=
"common.js"></script>
13 <script type=
"text/javascript" src=
"example.js"></script>
17 <h2>Status:
<code id=
"statusField">NO-STATUS
</code></h2>
18 <p>The Websocket example demonstrates how to use the Websocket API.
<br>
19 First set a server URL (or use the default), then push
"Connect" button to
20 establish a connection.
<br>
21 "Send" button sends text message on the left text area.
<br>
22 "Close" button closes the connection.
24 <form id=
"connectForm">
25 <input type=
"text" id=
"url" style=
"width: 400px"
26 value=
"ws://html5rocks.websocket.org/echo">
27 <input type=
"submit" value=
"Connect">
31 <input type=
"text" id=
"message" value=
"hello" style=
"width: 400px">
32 <input type=
"submit" value=
"Send">
33 <input type=
"checkbox" id=
"is_binary">as a binary message
36 <button id=
"closeButton">Close
</button>
37 <pre id=
"log" style=
"font-weight: bold"></pre>
38 <div id=
"listener"></div>