Lines Matching defs:context
31 wsi_from_fd(const struct lws_context *context, lws_sockfd_type fd)
36 for (n = 0; n < context->fd_hashtable[h].length; n++)
37 if (context->fd_hashtable[h].wsi[n]->desc.sockfd == fd)
38 return context->fd_hashtable[h].wsi[n];
44 insert_wsi(struct lws_context *context, struct lws *wsi)
48 if (context->fd_hashtable[h].length == (getdtablesize() - 1)) {
53 context->fd_hashtable[h].wsi[context->fd_hashtable[h].length++] = wsi;
59 delete_from_fd(struct lws_context *context, lws_sockfd_type fd)
64 for (n = 0; n < context->fd_hashtable[h].length; n++)
65 if (context->fd_hashtable[h].wsi[n]->desc.sockfd == fd) {
66 while (n < context->fd_hashtable[h].length) {
67 context->fd_hashtable[h].wsi[n] =
68 context->fd_hashtable[h].wsi[n + 1];
71 context->fd_hashtable[h].length--;