aaronblohowiak / Push-It

JavaScript push server and client, developing real-time web applications should be easy.. now you can do it in js

Home Page:http://aaronblohowiak.github.com/Push-It

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how are disconnects handled?

flippyhead opened this issue · comments

When an agent disconnects (by closing their browser say) is that propagated up somehow?

Not in a good way, currently.

Through the underlying socket.io can throw a disconnect, which will include the Client (socket.io's concept of the user) but not the Agent (Push-It's concept of the user.)

I am very interested in what your use-case is for this, and how you would expect it to work -- this is something I would like to support but I have not yet decided on the best way to expose it. The code is written

https://github.com/aaronblohowiak/Push-It/blob/master/server/etc/push-it-proto.js#L167

But the function body is currently 'null' ;)

=)

Do you have any feedback about how you'd expect this to work?

I guess I don't really. I was, perhaps incorrectly, concerned that a bunch of stale connections would stick around but that seems not to be the case. For now it seems to work fine.

Ah okay, cool. If this becomes an issue, let me know.

BTW, I implemented onDisconnect today. 6af9207

This passes in the agent to your onDisconnect handler.