Lines Matching refs:vhd
68 struct per_vhost_data__minimal *vhd =
76 vhd = lws_protocol_vh_priv_zalloc(lws_get_vhost(wsi),
79 vhd->context = lws_get_context(wsi);
80 vhd->protocol = lws_get_protocol(wsi);
81 vhd->vhost = lws_get_vhost(wsi);
85 /* add ourselves to the list of live pss held in the vhd */
86 lws_ll_fwd_insert(pss, pss_list, vhd->pss_list);
88 pss->last = vhd->current;
94 pss, vhd->pss_list);
98 if (!vhd->amsg.payload)
101 if (pss->last == vhd->current)
105 m = lws_write(wsi, ((unsigned char *)vhd->amsg.payload) +
106 LWS_PRE, vhd->amsg.len, LWS_WRITE_TEXT);
107 if (m < (int)vhd->amsg.len) {
112 pss->last = vhd->current;
116 if (vhd->amsg.payload)
117 __minimal_destroy_message(&vhd->amsg);
119 vhd->amsg.len = len;
121 vhd->amsg.payload = malloc(LWS_PRE + len);
122 if (!vhd->amsg.payload) {
127 memcpy((char *)vhd->amsg.payload + LWS_PRE, in, len);
128 vhd->current++;
135 ppss, vhd->pss_list) {