<!DOCTYPE html>
<html>
<!--
Copyright 2012 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<title>{{title}}</title>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="example.js"></script>
</head>
<body {{attrs}}>
<h1>{{title}}</h1>
<h2>Status: <code id="statusField">NO-STATUS</code></h2>
<p>The Websocket example demonstrates how to use the Websocket API.<br>
First set a server URL (or use the default), then push "Connect" button to
establish a connection.<br>
"Send" button sends text message on the left text area.<br>
"Close" button closes the connection.
</p>
<form id="connectForm">
<input type="text" id="url" style="width: 400px"
value="ws://html5rocks.websocket.org/echo">
<input type="submit" value="Connect">
</form>
<form id="sendForm">
<input type="text" id="message" value="hello" style="width: 400px">
<input type="submit" value="Send">
<input type="checkbox" id="is_binary">as a binary message
</form>
<button id="closeButton">Close</button>
<pre id="log" style="font-weight: bold"></pre>
<div id="listener"></div>
</body>
</html>