Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: ppapi/c/ppb_websocket.h

Issue 10332138: WebSocket Pepper API: allow to close connection without code and reason (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reuse 1005 Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/c/ppb_websocket.h
diff --git a/ppapi/c/ppb_websocket.h b/ppapi/c/ppb_websocket.h
index 64638822e9c61cee6cc3d942cb33e8d00cb53fc1..b30bd3448e711ea95e6d2e1c03d66e1d777706a4 100644
--- a/ppapi/c/ppb_websocket.h
+++ b/ppapi/c/ppb_websocket.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_websocket.idl modified Wed Apr 25 11:48:30 2012. */
+/* From ppb_websocket.idl modified Wed May 16 17:05:41 2012. */
#ifndef PPAPI_C_PPB_WEBSOCKET_H_
#define PPAPI_C_PPB_WEBSOCKET_H_
@@ -72,6 +72,13 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_WebSocketReadyState, 4);
*/
typedef enum {
/**
+ * Indicates to request closing connection without status code and reasom.
+ * The code 1005 is forbidden to send in actual close frames by the RFC.
+ * PP_WebSocket reuses this code internally and the code will never appear in
+ * the actual close frames.
+ */
+ PP_WEBSOCKETSTATUSCODE_NOT_SPECIFIED = 1005,
+ /**
* Status codes in the range 0-999 are not used.
*/
/**
@@ -157,8 +164,8 @@ typedef enum {
*/
PP_WEBSOCKETSTATUSCODE_USER_PRIVATE_MIN = 4000,
PP_WEBSOCKETSTATUSCODE_USER_PRIVATE_MAX = 4999
-} PP_WebSocketCloseCode;
-PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_WebSocketCloseCode, 4);
+} PP_WebSocketStatusCode;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_WebSocketStatusCode, 4);
/**
* @}
*/
@@ -246,7 +253,8 @@ struct PPB_WebSocket_1_0 {
* @param[in] web_socket A <code>PP_Resource</code> corresponding to a
* WebSocket.
*
- * @param[in] code The WebSocket close code. This is ignored if it is 0.
+ * @param[in] code The WebSocket close code. This is ignored if it is
+ * <code>PP_WEBSOCKETSTATUSCODE_NOT_SPECIFIED</code>.
* <code>PP_WEBSOCKETSTATUSCODE_NORMAL_CLOSURE</code> must be used for the
* usual case. To indicate some specific error cases, codes in the range
* <code>PP_WEBSOCKETSTATUSCODE_USER_REGISTERED_MIN</code> to

Powered by Google App Engine
This is Rietveld 408576698