I have mobile clients connected to a node.js server, running socket.io via xhr-polling. I have two type of clients:
Type A
When the connection break
In socket.io 1.x, the API has changed but the concept remains the same.
Instead of heartbeatInterval and heartbeatTimeout, the properties are pingInterval and pingTimeout. For example,
var server = app.listen(80);
io = socketio(server,{'pingInterval': 45000});
See the documentation at http://socket.io/docs/server-api/#server(opts:object), which will direct you to https://github.com/Automattic/engine.io#methods-1.