nect"
         value="Send"/>
    </form>
  </div>
  <hr/>
  <div id="msgs"></div>

  <script type="text/javascript">
    var ws;
    if (!window.WebSocket) {
      alert("WebSocket not supported by this browser");
    }
    function $(id) {
      return document.getElementById(id);
    }
    function go() {
        ws = new WebSocket("ws://" + location.host + "/");
        ws.onopen = function () {
          $('connstate').innerHTML = 'CONNECTED';
        }
        ws.onclose = function () {
          $('c