<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
    <title>WebSockets Agent Client</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="wrapper">
    <div id="header">
        <h1>WebSockets Agent Client</h1>
        <button id="connect">Connect</button>
        <button id="start">Start</button>
        <button id="stop">Stop</button>
        <label for="interval-value">Interval</label>
        <input id="interval-value" type="text" style="width:40px;" value="1"/>
        <button id="interval">Set interval</button>
        <button id="disconnect">Disconnect</button>
    </div>
    <!-- #header -->
    <div id="canvas"></div>
</div>
<script src="client.js"></script>
<script>
    var client = new AgentServerClient(function (msg) {
        $('#canvas').prepend("<div class=\"data\">" + msg + "</div>");
    });

    $('#connect').on('click', client.connect);
    $('#start').on('click', client.start);
    $('#stop').on('click', client.stop);
    $('#interval').on('click', function () {
        client.setInterval($('#interval-value').val());
    });
    $('#disconnect').on('click', client.disconnect);
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
    <title>WebSockets Agent Client</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="wrapper">
    <div id="header">
        <h1>WebSockets Agent Client</h1>
        <button id="connect">Connect</button>
        <button id="start">Start</button>
        <button id="stop">Stop</button>
        <label for="interval-value">Interval</label>
        <input id="interval-value" type="text" style="width:40px;" value="1"/>
        <button id="interval">Set interval</button>
        <button id="disconnect">Disconnect</button>
    </div>
    <!-- #header -->
    <div id="canvas"></div>
</div>
<script src="client.js"></script>
<script>
    var client = new RtStat.WebSocketClient(function (msg) {
        $('#canvas').prepend("<div class=\"data\">" + msg + "</div>");
    });

    $('#connect').on('click', client.connect);
    $('#start').on('click', client.start);
    $('#stop').on('click', client.stop);
    $('#interval').on('click', function () {
        client.setInterval($('#interval-value').val());
    });
    $('#disconnect').on('click', client.disconnect);
</script>
</body>
</html>
Debug Client: fix fatal error
Debug Client: fix fatal error
