Lines Matching refs:vhd
54 cull_lagging_clients(struct per_vhost_data__minimal *vhd)
56 uint32_t oldest_tail = lws_ring_get_oldest_tail(vhd->ring);
58 int most = 0, before = (int)lws_ring_get_count_waiting_elements(vhd->ring,
68 ppss, vhd->pss_list, pss_list) {
95 * vhd pss list early. (This is safe to repeat
102 pss_list, (*ppss), vhd->pss_list);
114 m = (int)lws_ring_get_count_waiting_elements(vhd->ring,
131 lws_ring_consume_and_update_oldest_tail(vhd->ring,
133 vhd->pss_list, tail, pss_list);
156 struct per_vhost_data__minimal *vhd =
166 vhd = lws_protocol_vh_priv_zalloc(lws_get_vhost(wsi),
169 vhd->context = lws_get_context(wsi);
170 vhd->protocol = lws_get_protocol(wsi);
171 vhd->vhost = lws_get_vhost(wsi);
173 vhd->ring = lws_ring_create(sizeof(struct msg), 8,
175 if (!vhd->ring)
180 lws_ring_destroy(vhd->ring);
184 /* add ourselves to the list of live pss held in the vhd */
186 lws_ll_fwd_insert(pss, pss_list, vhd->pss_list);
187 pss->tail = lws_ring_get_oldest_tail(vhd->ring);
195 pss, vhd->pss_list);
201 pmsg = lws_ring_get_element(vhd->ring, &pss->tail);
214 vhd->ring, /* lws_ring object */
218 vhd->pss_list, /* head of list of objects with tails */
224 if (lws_ring_get_element(vhd->ring, &pss->tail))
230 n = (int)lws_ring_get_count_free_elements(vhd->ring);
233 cull_lagging_clients(vhd);
234 n = (int)lws_ring_get_count_free_elements(vhd->ring);
251 if (!lws_ring_insert(vhd->ring, &amsg, 1)) {
262 ppss, vhd->pss_list) {