Lines Matching refs:ws
62 wsi->ws->count_act_ext = 0;
115 ext = wsi->a.vhost->ws.extensions;
128 for (m = 0; m < wsi->ws->count_act_ext; m++)
129 if (wsi->ws->active_extensions[m] == ext) {
158 wsi->ws->active_extensions[wsi->ws->count_act_ext] = ext;
164 (void *)&wsi->ws->act_ext_user[
165 wsi->ws->count_act_ext],
217 wsi->ws->act_ext_user[
218 wsi->ws->count_act_ext],
236 wsi->ws->count_act_ext++;
238 wsi->ws->count_act_ext);
266 * For vhost ws basic auth, it is "basic-auth": "path" as usual but
267 * applied to the protocol's entry in the vhost's "ws-protocols":
275 lwsl_info("%s: ws upgrade requires basic auth\n", __func__);
290 * We are upgrading to ws, so http/1.1 + h2 and keepalive + pipelined
293 * However it's common for the first ws protocol data to have been
311 * If we're a SS server object, we have to switch to ss-ws
315 lwsl_info("%s: %s switching to ws protocol\n",
333 /* allocate the ws struct for the wsi */
335 wsi->ws = lws_zalloc(sizeof(*wsi->ws), "ws struct");
336 if (!wsi->ws) {
342 wsi->ws->ietf_spec_revision = (uint8_t)
368 switch (wsi->ws->ietf_spec_revision) {
371 wsi->ws->ietf_spec_revision);
372 wsi->ws->ietf_spec_revision = 13;
379 lwsl_notice("h2 ws handshake failed\n");
409 lwsl_parser("accepted v%02d connection\n", wsi->ws->ietf_spec_revision);
432 lwsl_info("%s: %s: dropping ah on ws upgrade\n", __func__, lws_wsi_tag(wsi));
454 * header. h2 / ws-over-h2 does not have this.
509 * We are an h1 ws upgrade on a urlpath that corresponds
547 * these "no protocol" ws connections to be rejected.
551 lwsl_notice("%s: rejecting ws upg with no protocol\n",
560 "ws upgrade default pcol");
570 * At the moment, once we see it's a ss ws server, whatever
571 * he asked for we bind him to the ss-ws protocol handler.
575 * sssh->policy->u.http.u.ws.subprotocol
580 if (sssh->policy->u.http.u.ws.subprotocol) {
582 "lws-secstream-ws");
584 lws_bind_protocol(wsi, pcol, "ss ws upg pcol");
608 lws_bind_protocol(wsi, pcol, "ws upg pcol");
705 prot = wsi->child_list->ws->actual_protocol;
713 * At the moment, once we see it's a ss ws server, whatever
714 * he asked for we bind him to the ss-ws protocol handler.
718 * sssh->policy->u.http.u.ws.subprotocol
724 sssh->policy->u.http.u.ws.subprotocol)
725 prot = sssh->policy->u.http.u.ws.subprotocol;
811 unsigned int old_packet_length = (unsigned int)wsi->ws->rx_packet_length;
824 if (!wsi->ws->count_act_ext)
834 if (avail > wsi->ws->rx_packet_length)
835 avail = (unsigned int)wsi->ws->rx_packet_length;
849 if (!wsi->ws->all_zero_nonce) {
852 mask[n] = wsi->ws->mask[(wsi->ws->mask_idx + n) & 3];
872 wsi->ws->mask_idx = (wsi->ws->mask_idx + avail) & 3;
880 wsi->ws->rx_packet_length -= avail;
906 * raw ws payload still to drain at that time.
908 * Then we need to generate a zero length ws rx that can be understood
915 !wsi->ws->rx_packet_length && /* raw ws packet payload all gone */
916 wsi->ws->final && /* the raw ws packet is a FIN guy */
934 if (wsi->ws->count_act_ext && !pmdrx.eb_out.len)
945 wsi->ws->check_utf8 && !wsi->ws->defeat_check_utf8) {
946 if (lws_check_utf8(&wsi->ws->utf8,
955 if (!wsi->ws->rx_packet_length && wsi->ws->final &&
956 wsi->ws->utf8 && !n) {
977 wsi->ws->first_fragment = 0;
982 wsi->ws->rx_draining_ext);
1034 if (wsi->ws->rx_draining_ext) {
1045 (wsi->ws->opcode == LWSWSOPC_TEXT_FRAME ||
1046 wsi->ws->opcode == LWSWSOPC_BINARY_FRAME ||
1047 wsi->ws->opcode == LWSWSOPC_CONTINUATION) &&
1078 "wsi->ws->rx_draining_ext %d\n",
1080 wsi->ws->rx_draining_ext);