Lines Matching refs:head
119 ws_frame_name_of_op(dec->head[0]), in ws_dec_info()
120 (dec->head[0] & WSBIT_FIN) ? "" : " NON-FINAL"); in ws_dec_info()
125 ws_frame_name_of_op(dec->head[0]), in ws_dec_info()
126 (dec->head[0] & WSBIT_FIN) ? "" : " NON-FINAL", in ws_dec_info()
132 msg, ws_frame_name_of_op(dec->head[0]), in ws_dec_info()
133 (dec->head[0] & WSBIT_FIN) ? "" : " NON-FINAL", in ws_dec_info()
175 dec->head[0] = *inbuf; in ws_dec_read_head()
178 dec->frame_flags = ws_frame_op2flags(dec->head[0]); in ws_dec_read_head()
180 failf(data, "WS: unknown opcode: %x", dec->head[0]); in ws_dec_read_head()
189 dec->head[1] = *inbuf; in ws_dec_read_head()
193 if(dec->head[1] & WSBIT_MASK) { in ws_dec_read_head()
200 if(dec->head[1] == 126) { in ws_dec_read_head()
204 else if(dec->head[1] == 127) { in ws_dec_read_head()
214 dec->head[dec->head_len] = *inbuf; in ws_dec_read_head()
226 dec->payload_len = dec->head[1]; in ws_dec_read_head()
229 dec->payload_len = (dec->head[2] << 8) | dec->head[3]; in ws_dec_read_head()
232 if(dec->head[2] > 127) { in ws_dec_read_head()
236 dec->payload_len = ((curl_off_t)dec->head[2] << 56) | in ws_dec_read_head()
237 (curl_off_t)dec->head[3] << 48 | in ws_dec_read_head()
238 (curl_off_t)dec->head[4] << 40 | in ws_dec_read_head()
239 (curl_off_t)dec->head[5] << 32 | in ws_dec_read_head()
240 (curl_off_t)dec->head[6] << 24 | in ws_dec_read_head()
241 (curl_off_t)dec->head[7] << 16 | in ws_dec_read_head()
242 (curl_off_t)dec->head[8] << 8 | in ws_dec_read_head()
243 dec->head[9]; in ws_dec_read_head()
547 unsigned char head[14]; in ws_enc_write_head() local
594 head[0] = enc->firstbyte = firstbyte; in ws_enc_write_head()
596 head[1] = 127 | WSBIT_MASK; in ws_enc_write_head()
597 head[2] = (unsigned char)((payload_len >> 56) & 0xff); in ws_enc_write_head()
598 head[3] = (unsigned char)((payload_len >> 48) & 0xff); in ws_enc_write_head()
599 head[4] = (unsigned char)((payload_len >> 40) & 0xff); in ws_enc_write_head()
600 head[5] = (unsigned char)((payload_len >> 32) & 0xff); in ws_enc_write_head()
601 head[6] = (unsigned char)((payload_len >> 24) & 0xff); in ws_enc_write_head()
602 head[7] = (unsigned char)((payload_len >> 16) & 0xff); in ws_enc_write_head()
603 head[8] = (unsigned char)((payload_len >> 8) & 0xff); in ws_enc_write_head()
604 head[9] = (unsigned char)(payload_len & 0xff); in ws_enc_write_head()
608 head[1] = 126 | WSBIT_MASK; in ws_enc_write_head()
609 head[2] = (unsigned char)((payload_len >> 8) & 0xff); in ws_enc_write_head()
610 head[3] = (unsigned char)(payload_len & 0xff); in ws_enc_write_head()
614 head[1] = (unsigned char)payload_len | WSBIT_MASK; in ws_enc_write_head()
622 memcpy(&head[hlen], &enc->mask, 4); in ws_enc_write_head()
627 n = Curl_bufq_write(out, head, hlen, err); in ws_enc_write_head()