+ if (ws->itf->on_extension != NULL) {
+ if (ws->itf->on_extension(ws->closure,
+ FRAME_GET_FIN(ws->header[0]),
+ FRAME_GET_RSV1(ws->header[0]),
+ FRAME_GET_RSV2(ws->header[0]),
+ FRAME_GET_RSV3(ws->header[0]),
+ FRAME_GET_OPCODE(ws->header[0]),
+ (size_t) ws->length)) {
+ return 0;
+ }
+ }
+
+ /* not an extension case */
+ if (FRAME_GET_RSV1(ws->header[0]) != 0)
+ goto protocol_error;
+ if (FRAME_GET_RSV2(ws->header[0]) != 0)
+ goto protocol_error;
+ if (FRAME_GET_RSV3(ws->header[0]) != 0)
+ goto protocol_error;
+
+ /* handle */