javascript - Socket.io specifying heartbeat -


i can't seem find out how set heartbeat options socket.io? i'd love able specify happens when "timemout" happens, , when server hasn't gotten response client time.

for reason disconnect event isn't firing, though has passed on hour without client not being connected. happens standalone java socket.io client

socket.io uses engine.io, allows specify ping interval , ping timeout, so:

var app = require('express')(); var http = require('http').server(app);  var io = require('socket.io')(http, {'pinginterval': 2000, 'pingtimeout': 5000}); 

(2 second interval , 5 second timeout example. way frequent , inefficient)


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -