Lines Matching refs:frame

31     nxt_unit_websocket_frame_t  *frame;  member
62 nxt_unit_websocket_frame_t *frame);
489 nxt_py_asgi_websocket_handler(nxt_unit_websocket_frame_t *frame) in nxt_py_asgi_websocket_handler() argument
497 ws = frame->req->data; in nxt_py_asgi_websocket_handler()
501 opcode = frame->header->opcode; in nxt_py_asgi_websocket_handler()
507 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_handler()
517 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_handler()
524 if (nxt_slow_path(frame->payload_len > rest)) { in nxt_py_asgi_websocket_handler()
525 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_handler()
532 if (nxt_slow_path(frame->payload_len > rest)) { in nxt_py_asgi_websocket_handler()
533 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_handler()
538 if (ws->receive_future == NULL || frame->header->fin == 0) { in nxt_py_asgi_websocket_handler()
539 nxt_py_asgi_websocket_suspend_frame(frame); in nxt_py_asgi_websocket_handler()
556 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_handler()
562 msg = nxt_py_asgi_websocket_pop_msg(ws, frame); in nxt_py_asgi_websocket_handler()
671 nxt_py_asgi_websocket_suspend_frame(nxt_unit_websocket_frame_t *frame) in nxt_py_asgi_websocket_suspend_frame() argument
677 nxt_unit_req_debug(frame->req, "asgi_websocket_suspend_frame: " in nxt_py_asgi_websocket_suspend_frame()
679 frame->header->opcode, frame->payload_len, in nxt_py_asgi_websocket_suspend_frame()
680 frame->header->fin); in nxt_py_asgi_websocket_suspend_frame()
682 ws = frame->req->data; in nxt_py_asgi_websocket_suspend_frame()
684 rc = nxt_unit_websocket_retain(frame); in nxt_py_asgi_websocket_suspend_frame()
688 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_suspend_frame()
696 p = nxt_unit_malloc(frame->req->ctx, sizeof(nxt_py_asgi_penging_frame_t)); in nxt_py_asgi_websocket_suspend_frame()
701 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_suspend_frame()
709 p->frame = frame; in nxt_py_asgi_websocket_suspend_frame()
712 ws->pending_payload_len += frame->payload_len; in nxt_py_asgi_websocket_suspend_frame()
713 ws->pending_fins += frame->header->fin; in nxt_py_asgi_websocket_suspend_frame()
715 if (frame->header->fin) { in nxt_py_asgi_websocket_suspend_frame()
719 if (frame->header->opcode == NXT_WEBSOCKET_OP_CONT) { in nxt_py_asgi_websocket_suspend_frame()
720 ws->pending_frame_len += frame->payload_len; in nxt_py_asgi_websocket_suspend_frame()
723 ws->pending_frame_len = frame->payload_len; in nxt_py_asgi_websocket_suspend_frame()
731 nxt_unit_websocket_frame_t *frame) in nxt_py_asgi_websocket_pop_msg() argument
746 || (frame != NULL in nxt_py_asgi_websocket_pop_msg()
747 && frame->header->opcode == NXT_WEBSOCKET_OP_CLOSE)) in nxt_py_asgi_websocket_pop_msg()
749 payload_len = frame->payload_len; in nxt_py_asgi_websocket_pop_msg()
752 if (frame != NULL) { in nxt_py_asgi_websocket_pop_msg()
753 payload_len = ws->pending_payload_len + frame->payload_len; in nxt_py_asgi_websocket_pop_msg()
754 fin_frame = frame; in nxt_py_asgi_websocket_pop_msg()
760 frame = nxt_py_asgi_websocket_pop_frame(ws); in nxt_py_asgi_websocket_pop_msg()
763 opcode = frame->header->opcode; in nxt_py_asgi_websocket_pop_msg()
769 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_pop_msg()
779 buf = nxt_unit_malloc(frame->req->ctx, payload_len); in nxt_py_asgi_websocket_pop_msg()
785 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_pop_msg()
805 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_pop_msg()
817 if (frame->payload_len >= 2) { in nxt_py_asgi_websocket_pop_msg()
818 nxt_unit_websocket_read(frame, code_buf, 2); in nxt_py_asgi_websocket_pop_msg()
825 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_pop_msg()
848 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_pop_msg()
855 fin = frame->header->fin; in nxt_py_asgi_websocket_pop_msg()
856 buf += nxt_unit_websocket_read(frame, buf, frame->payload_len); in nxt_py_asgi_websocket_pop_msg()
858 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_pop_msg()
862 frame = nxt_py_asgi_websocket_pop_frame(ws); in nxt_py_asgi_websocket_pop_msg()
863 fin = frame->header->fin; in nxt_py_asgi_websocket_pop_msg()
865 buf += nxt_unit_websocket_read(frame, buf, frame->payload_len); in nxt_py_asgi_websocket_pop_msg()
867 nxt_unit_websocket_done(frame); in nxt_py_asgi_websocket_pop_msg()
931 res += p->frame->payload_len; in nxt_py_asgi_websocket_pending_len()
933 if (p->frame->header->fin) { in nxt_py_asgi_websocket_pending_len()
950 nxt_unit_websocket_frame_t *frame; in nxt_py_asgi_websocket_pop_frame() local
958 frame = p->frame; in nxt_py_asgi_websocket_pop_frame()
959 ws->pending_payload_len -= frame->payload_len; in nxt_py_asgi_websocket_pop_frame()
960 ws->pending_fins -= frame->header->fin; in nxt_py_asgi_websocket_pop_frame()
962 nxt_unit_free(frame->req->ctx, p); in nxt_py_asgi_websocket_pop_frame()
964 nxt_unit_req_debug(frame->req, "asgi_websocket_pop_frame: " in nxt_py_asgi_websocket_pop_frame()
966 frame->header->opcode, frame->payload_len, in nxt_py_asgi_websocket_pop_frame()
967 frame->header->fin); in nxt_py_asgi_websocket_pop_frame()
969 return frame; in nxt_py_asgi_websocket_pop_frame()