Lines Matching refs:vh
47 lws_vhost_bind_wsi(struct lws_vhost *vh, struct lws *wsi) in lws_vhost_bind_wsi() argument
49 if (wsi->vhost == vh) in lws_vhost_bind_wsi()
51 lws_context_lock(vh->context, __func__); /* ---------- context { */ in lws_vhost_bind_wsi()
52 wsi->vhost = vh; in lws_vhost_bind_wsi()
53 vh->count_bound_wsi++; in lws_vhost_bind_wsi()
54 lws_context_unlock(vh->context); /* } context ---------- */ in lws_vhost_bind_wsi()
56 vh->name, wsi->role_ops ? wsi->role_ops->name : "none", in lws_vhost_bind_wsi()
58 vh->count_bound_wsi); in lws_vhost_bind_wsi()
114 lws_vhost_name_to_protocol(struct lws_vhost *vh, const char *name) in lws_vhost_name_to_protocol() argument
118 for (n = 0; n < vh->count_protocols; n++) in lws_vhost_name_to_protocol()
119 if (vh->protocols[n].name && !strcmp(name, vh->protocols[n].name)) in lws_vhost_name_to_protocol()
120 return &vh->protocols[n]; in lws_vhost_name_to_protocol()
149 lws_callback_all_protocol_vhost_args(struct lws_vhost *vh, in lws_callback_all_protocol_vhost_args() argument
153 struct lws_context *context = vh->context; in lws_callback_all_protocol_vhost_args()
163 if (wsi->vhost == vh && (wsi->protocol == protocol || in lws_callback_all_protocol_vhost_args()
175 lws_callback_all_protocol_vhost(struct lws_vhost *vh, in lws_callback_all_protocol_vhost() argument
178 return lws_callback_all_protocol_vhost_args(vh, protocol, reason, NULL, 0); in lws_callback_all_protocol_vhost()
194 lws_callback_vhost_protocols_vhost(struct lws_vhost *vh, int reason, void *in, in lws_callback_vhost_protocols_vhost() argument
203 wsi->context = vh->context; in lws_callback_vhost_protocols_vhost()
204 lws_vhost_bind_wsi(vh, wsi); in lws_callback_vhost_protocols_vhost()
207 wsi->protocol = &vh->protocols[n]; in lws_callback_vhost_protocols_vhost()