Home | History | Annotate | Download | only in sample

Lines Matching defs:http

1 /*	$NetBSD: http-server.c,v 1.1.1.4 2021/04/07 02:43:15 christos Exp $	*/
3 A trivial static http webserver using Libevent's evhttp.
47 #include <event2/http.h>
178 /* This callback gets invoked when we get any http request that doesn't match
437 "http://%s:%d",addr,got_port);
451 struct evhttp *http = NULL;
499 http = evhttp_new(base);
500 if (!http) {
506 evhttp_set_cb(http, "/dump", dump_request_cb, NULL);
510 evhttp_set_gencb(http, send_document_cb, &o);
534 handle = evhttp_bind_listener(http, lev);
547 handle = evhttp_bind_socket_with_handle(http, "0.0.0.0", o.port);
575 if (http)
576 evhttp_free(http);