wsi->u.hdr.name_buffer_pos = 0;
wsi->user_space = NULL;
wsi->state = WSI_STATE_CLIENT_UNCONNECTED;
- wsi->u.ws.pings_vs_pongs = 0;
wsi->protocol = NULL;
wsi->pending_timeout = NO_PENDING_TIMEOUT;
#ifndef LWS_NO_EXTENSIONS
lwsl_info("client receied pong\n");
lwsl_hexdump(&wsi->u.ws.rx_user_buffer[LWS_SEND_BUFFER_PRE_PADDING],
wsi->u.ws.rx_user_buffer_head);
- /* keep the statistics... */
- wsi->u.ws.pings_vs_pongs--;
/* issue it */
callback_action = LWS_CALLBACK_CLIENT_RECEIVE_PONG;
break;
case LWS_WRITE_PING:
n = LWS_WS_OPCODE_07__PING;
- wsi->u.ws.pings_vs_pongs++;
break;
case LWS_WRITE_PONG:
n = LWS_WS_OPCODE_07__PONG;
return 0;
case LWS_WS_OPCODE_07__PONG:
- /* keep the statistics... */
- wsi->u.ws.pings_vs_pongs--;
/* ... then just drop it */
wsi->u.ws.rx_user_buffer_head = 0;
return 0;
struct _lws_websocket_related {
char *rx_user_buffer;
int rx_user_buffer_head;
- unsigned char masking_key_04[20];
unsigned char frame_masking_nonce_04[4];
- unsigned char frame_mask_04[20];
unsigned char frame_mask_index;
size_t rx_packet_length;
unsigned char opcode;
unsigned int final:1;
unsigned char rsv;
unsigned int frame_is_binary:1;
- int pings_vs_pongs;
unsigned int all_zero_nonce:1;
enum lws_close_status close_reason;
unsigned char *rxflow_buffer;