• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/forked-daapd-0.19/src/evhttp/

Lines Matching refs:http

88 #include "http-internal.h"
193 /* wrapper for setting the base from the http server */
656 * or an http layer error. for problems on the network
1019 struct evhttp *http = evcon->http_server;
1020 TAILQ_REMOVE(&http->connections, evcon, next);
2274 struct evhttp *http = arg;
2289 if ((cb = evhttp_dispatch_callback(&http->callbacks, req)) != NULL) {
2296 if (http->gencb) {
2298 (*http->gencb)(req, http->gencbarg);
2328 struct evhttp *http = arg;
2341 evhttp_get_request(http, nfd, (struct sockaddr *)&ss, addrlen);
2345 evhttp_bind_socket(struct evhttp *http, const char *address, u_short port)
2370 res = evhttp_accept_socket(http, fd);
2380 evhttp_accept_socket(struct evhttp *http, int fd)
2393 event_set(ev, fd, EV_READ | EV_PERSIST, accept_socket, http);
2394 EVHTTP_BASE_SET(http, ev);
2403 TAILQ_INSERT_TAIL(&http->sockets, bound, next);
2411 struct evhttp *http = NULL;
2413 if ((http = calloc(1, sizeof(struct evhttp))) == NULL) {
2418 http->timeout = -1;
2420 TAILQ_INIT(&http->sockets);
2421 TAILQ_INIT(&http->callbacks);
2422 TAILQ_INIT(&http->connections);
2424 return (http);
2430 struct evhttp *http = evhttp_new_object();
2432 http->base = base;
2434 return (http);
2444 struct evhttp *http = evhttp_new_object();
2446 if (evhttp_bind_socket(http, address, port) == -1) {
2447 free(http);
2451 return (http);
2455 evhttp_free(struct evhttp* http)
2463 while ((bound = TAILQ_FIRST(&http->sockets)) != NULL) {
2464 TAILQ_REMOVE(&http->sockets, bound, next);
2473 while ((evcon = TAILQ_FIRST(&http->connections)) != NULL) {
2478 while ((http_cb = TAILQ_FIRST(&http->callbacks)) != NULL) {
2479 TAILQ_REMOVE(&http->callbacks, http_cb, next);
2484 free(http);
2488 evhttp_set_timeout(struct evhttp* http, int timeout_in_secs)
2490 http->timeout = timeout_in_secs;
2494 evhttp_set_cb(struct evhttp *http, const char *uri,
2506 TAILQ_INSERT_TAIL(&http->callbacks, http_cb, next);
2510 evhttp_del_cb(struct evhttp *http, const char *uri)
2514 TAILQ_FOREACH(http_cb, &http->callbacks, next) {
2521 TAILQ_REMOVE(&http->callbacks, http_cb, next);
2529 evhttp_set_gencb(struct evhttp *http,
2532 http->gencb = cb;
2533 http->gencbarg = cbarg;
2644 struct evhttp* http,
2660 /* we need a connection object to put the http request on */
2668 evhttp_connection_set_base(evcon, http->base);
2681 struct evhttp *http = evcon->http_server;
2683 if ((req = evhttp_request_new(evhttp_handle_request, http)) == NULL)
2703 evhttp_get_request(struct evhttp *http, int fd,
2708 evcon = evhttp_get_request_connection(http, fd, sa, salen);
2713 if (http->timeout != -1)
2714 evhttp_connection_set_timeout(evcon, http->timeout);
2718 * we need to know which http server it belongs to.
2720 evcon->http_server = http;
2721 TAILQ_INSERT_TAIL(&http->connections, evcon, next);