/[projects]/miscJava/Test3/WebContent/WebsockTest.html
ViewVC logotype

Diff of /miscJava/Test3/WebContent/WebsockTest.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2109 by torben, Tue Feb 11 09:32:16 2014 UTC revision 2112 by torben, Tue Feb 11 10:02:13 2014 UTC
# Line 13  function setActTime() { Line 13  function setActTime() {
13  }  }
14    
15  function append(str) {  function append(str) {
16            var d = new Date();
17            var dateStr = "[" + d.toLocaleTimeString() + "] ";
18          var log = $("#log");          var log = $("#log");
19          log.val( log.val() + str + "\n")          log.val( log.val() + dateStr + str + "\n")
20  }  }
21    
22  function sendMessage() {  function sendMessage() {
# Line 55  $( function() { Line 57  $( function() {
57                  socket.onclose = function(){                  socket.onclose = function(){
58                          var now = new Date().getTime();                          var now = new Date().getTime();
59                          var elapsed = now - actTime;                          var elapsed = now - actTime;
60                            elapsed = elapsed / 1000;
61                                                    
62                  append('Connection closed after ' + elapsed + ' seconds of inactivity');                  append('Connection closed after ' + elapsed + ' seconds of inactivity');
63          }          }
# Line 87  $( function() { Line 90  $( function() {
90  <input size=120  type="text" name="txt" id="txt">  <input size=120  type="text" name="txt" id="txt">
91  <button id="btn">Submit</button>  <button id="btn">Submit</button>
92    
93    <br><br>
94    <font size="2">
95    If using websockets with haproxy look into <code>timeout tunnel</code> option.
96    </font>
97    
98  </body>  </body>
 </html>  
99    </html>

Legend:
Removed from v.2109  
changed lines
  Added in v.2112

  ViewVC Help
Powered by ViewVC 1.1.20