• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libevent-1.4.14b-stable/

Lines Matching refs:http

90 #include "http-internal.h"
192 /* wrapper for setting the base from the http server */
653 * or an http layer error. for problems on the network
1017 struct evhttp *http = evcon->http_server;
1018 TAILQ_REMOVE(&http->connections, evcon, next);
2227 struct evhttp *http = arg;
2242 if ((cb = evhttp_dispatch_callback(&http->callbacks, req)) != NULL) {
2248 if (http->gencb) {
2249 (*http->gencb)(req, http->gencbarg);
2279 struct evhttp *http = arg;
2292 evhttp_get_request(http, nfd, (struct sockaddr *)&ss, addrlen);
2296 evhttp_bind_socket(struct evhttp *http, const char *address, u_short port)
2310 res = evhttp_accept_socket(http, fd);
2320 evhttp_accept_socket(struct evhttp *http, int fd)
2333 event_set(ev, fd, EV_READ | EV_PERSIST, accept_socket, http);
2334 EVHTTP_BASE_SET(http, ev);
2343 TAILQ_INSERT_TAIL(&http->sockets, bound, next);
2351 struct evhttp *http = NULL;
2353 if ((http = calloc(1, sizeof(struct evhttp))) == NULL) {
2358 http->timeout = -1;
2360 TAILQ_INIT(&http->sockets);
2361 TAILQ_INIT(&http->callbacks);
2362 TAILQ_INIT(&http->connections);
2364 return (http);
2370 struct evhttp *http = evhttp_new_object();
2372 http->base = base;
2374 return (http);
2384 struct evhttp *http = evhttp_new_object();
2386 if (evhttp_bind_socket(http, address, port) == -1) {
2387 free(http);
2391 return (http);
2395 evhttp_free(struct evhttp* http)
2403 while ((bound = TAILQ_FIRST(&http->sockets)) != NULL) {
2404 TAILQ_REMOVE(&http->sockets, bound, next);
2413 while ((evcon = TAILQ_FIRST(&http->connections)) != NULL) {
2418 while ((http_cb = TAILQ_FIRST(&http->callbacks)) != NULL) {
2419 TAILQ_REMOVE(&http->callbacks, http_cb, next);
2424 free(http);
2428 evhttp_set_timeout(struct evhttp* http, int timeout_in_secs)
2430 http->timeout = timeout_in_secs;
2434 evhttp_set_cb(struct evhttp *http, const char *uri,
2446 TAILQ_INSERT_TAIL(&http->callbacks, http_cb, next);
2450 evhttp_del_cb(struct evhttp *http, const char *uri)
2454 TAILQ_FOREACH(http_cb, &http->callbacks, next) {
2461 TAILQ_REMOVE(&http->callbacks, http_cb, next);
2469 evhttp_set_gencb(struct evhttp *http,
2472 http->gencb = cb;
2473 http->gencbarg = cbarg;
2584 struct evhttp* http,
2600 /* we need a connection object to put the http request on */
2608 evhttp_connection_set_base(evcon, http->base);
2621 struct evhttp *http = evcon->http_server;
2623 if ((req = evhttp_request_new(evhttp_handle_request, http)) == NULL)
2643 evhttp_get_request(struct evhttp *http, int fd,
2648 evcon = evhttp_get_request_connection(http, fd, sa, salen);
2653 if (http->timeout != -1)
2654 evhttp_connection_set_timeout(evcon, http->timeout);
2658 * we need to know which http server it belongs to.
2660 evcon->http_server = http;
2661 TAILQ_INSERT_TAIL(&http->connections, evcon, next);