Lines Matching refs:ws

84 static void nxt_unit_websocket_frame_release(nxt_unit_websocket_frame_t *ws);
86 nxt_unit_websocket_frame_impl_t *ws);
268 nxt_unit_websocket_frame_t ws; member
1636 ws_impl->ws.req = req; in nxt_unit_process_websocket()
1658 nxt_unit_websocket_frame_release(&ws_impl->ws); in nxt_unit_process_websocket()
1671 ws_impl->ws.header = (void *) b->buf.start; in nxt_unit_process_websocket()
1672 ws_impl->ws.payload_len = nxt_websocket_frame_payload_len( in nxt_unit_process_websocket()
1673 ws_impl->ws.header); in nxt_unit_process_websocket()
1675 hsize = nxt_websocket_frame_header_size(ws_impl->ws.header); in nxt_unit_process_websocket()
1677 if (ws_impl->ws.header->mask) { in nxt_unit_process_websocket()
1678 ws_impl->ws.mask = (uint8_t *) b->buf.start + hsize - 4; in nxt_unit_process_websocket()
1681 ws_impl->ws.mask = NULL; in nxt_unit_process_websocket()
1686 ws_impl->ws.content_buf = &b->buf; in nxt_unit_process_websocket()
1687 ws_impl->ws.content_length = ws_impl->ws.payload_len; in nxt_unit_process_websocket()
1691 ws_impl->ws.header->opcode, in nxt_unit_process_websocket()
1692 ws_impl->ws.payload_len); in nxt_unit_process_websocket()
1694 cb->websocket_handler(&ws_impl->ws); in nxt_unit_process_websocket()
1878 nxt_unit_websocket_frame_release(nxt_unit_websocket_frame_t *ws) in nxt_unit_websocket_frame_release() argument
1882 ws_impl = nxt_container_of(ws, nxt_unit_websocket_frame_impl_t, ws); in nxt_unit_websocket_frame_release()
1888 ws->req = NULL; in nxt_unit_websocket_frame_release()
3401 nxt_unit_websocket_read(nxt_unit_websocket_frame_t *ws, void *dst, in nxt_unit_websocket_read() argument
3408 res = nxt_unit_buf_read(&ws->content_buf, &ws->content_length, in nxt_unit_websocket_read()
3411 if (ws->mask == NULL) { in nxt_unit_websocket_read()
3416 d = (ws->payload_len - ws->content_length - res) % 4; in nxt_unit_websocket_read()
3419 b[i] ^= ws->mask[ (i + d) % 4 ]; in nxt_unit_websocket_read()
3427 nxt_unit_websocket_retain(nxt_unit_websocket_frame_t *ws) in nxt_unit_websocket_retain() argument
3433 ws_impl = nxt_container_of(ws, nxt_unit_websocket_frame_impl_t, ws); in nxt_unit_websocket_retain()
3441 b = nxt_unit_malloc(ws->req->ctx, size); in nxt_unit_websocket_retain()
3456 ws_impl->ws.header = (nxt_websocket_header_t *) b; in nxt_unit_websocket_retain()
3458 if (ws_impl->ws.header->mask) { in nxt_unit_websocket_retain()
3459 ws_impl->ws.mask = (uint8_t *) b + hsize - 4; in nxt_unit_websocket_retain()
3462 ws_impl->ws.mask = NULL; in nxt_unit_websocket_retain()
3470 nxt_unit_websocket_done(nxt_unit_websocket_frame_t *ws) in nxt_unit_websocket_done() argument
3472 nxt_unit_websocket_frame_release(ws); in nxt_unit_websocket_done()