Reputation: 123
When I use "chrome.experimental.socket API" on chrome-extension, how do I know the socket had been disconnected or, is disconnected just now. I'm use Canary-Chrome.
Upvotes: 2
Views: 181
Reputation: 36
I've just made a change which adds a getInfo call to the socket API, which includes the connected/disconnected state.
However it's worth noting that a socket may remain 'connected' even if say, the remote end has dropped the connection; after this kind of drop, a read() will return an error/EOF.
Upvotes: 2
Reputation: 4236
Getting the state of a socket is currently not possible with the API. I have filed a Chromium feature request for this.
Upvotes: 0