You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
The text was updated successfully, but these errors were encountered:
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;
The text was updated successfully, but these errors were encountered: