55 |
socket.onclose = function(){ |
socket.onclose = function(){ |
56 |
var now = new Date().getTime(); |
var now = new Date().getTime(); |
57 |
var elapsed = now - actTime; |
var elapsed = now - actTime; |
58 |
|
elapsed = elapsed / 1000; |
59 |
|
|
60 |
append('Connection closed after ' + elapsed + ' seconds of inactivity'); |
append('Connection closed after ' + elapsed + ' seconds of inactivity'); |
61 |
} |
} |
88 |
<input size=120 type="text" name="txt" id="txt"> |
<input size=120 type="text" name="txt" id="txt"> |
89 |
<button id="btn">Submit</button> |
<button id="btn">Submit</button> |
90 |
|
|
91 |
|
<br><br> |
92 |
|
<font size="2"> |
93 |
|
If using websockets with haproxy look into <code>timeout tunnel</code> option. |
94 |
|
</font> |
95 |
|
|
96 |
</body> |
</body> |
|
</html> |
|
97 |
|
</html> |