holepunchto / hyperswarm

A distributed networking stack for connecting peers.
https://docs.holepunch.to
MIT License
1.03k stars 84 forks source link

Add 'update' event, and .connecting property public #132

Closed LuKks closed 1 year ago

kasperisager commented 1 year ago

@LuKks @mafintosh From the looks of it, isn't the only additional information provided by this event a way to determine when clients disconnect?

mafintosh commented 1 year ago

@kasperisager right now it tracks new connection, disconnect AND when the .connecting prop changes. it will also emit later when the nat info changes (pending the dht-rpc pr)

kasperisager commented 1 year ago

@mafintosh Makes sense!

LuKks commented 1 year ago

Current limitation: when we receive a server connection then socket is already 'open', so we couldn't track .connecting for server connections (needs HyperDHT changes?), it's still ok because I think we're more interested on client connections

Btw I will move the retry timer test to the other PR where is a bit more relevant

LuKks commented 1 year ago

@kasperisager rebased now, in case you would like to confirm