-
-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
Our project use atmosphere.js , now I could get the response code is 200 from the "onClose" function.
Request.onClose(Response) {}
how to get the specified close code from the onClose function, such as 1000 or 1001. Because I need to recoginze whether the browser close the websocket or the server side close the websocket.
Thanks much.
``
case 1000:
reason = "Normal closure; the connection successfully completed whatever purpose for which it was created.";
break;
case 1001:
reason = "The endpoint is going away, either because of a server failure or because the "
+ "browser is navigating away from the page that opened the connection.";
break;
case 1002:
reason = "The endpoint is terminating the connection due to a protocol error.";
break;
Metadata
Metadata
Assignees
Labels
No labels