|
||||
File indexing completed on 2025-01-18 09:57:12
0001 /* 0002 * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu> 0003 * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 0004 * 0005 * Redistribution and use in source and binary forms, with or without 0006 * modification, are permitted provided that the following conditions 0007 * are met: 0008 * 1. Redistributions of source code must retain the above copyright 0009 * notice, this list of conditions and the following disclaimer. 0010 * 2. Redistributions in binary form must reproduce the above copyright 0011 * notice, this list of conditions and the following disclaimer in the 0012 * documentation and/or other materials provided with the distribution. 0013 * 3. The name of the author may not be used to endorse or promote products 0014 * derived from this software without specific prior written permission. 0015 * 0016 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 0017 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 0018 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 0019 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 0020 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 0021 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 0022 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 0023 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0024 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 0025 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0026 */ 0027 #ifndef EVENT2_HTTP_COMPAT_H_INCLUDED_ 0028 #define EVENT2_HTTP_COMPAT_H_INCLUDED_ 0029 0030 /** @file event2/http_compat.h 0031 0032 Potentially non-threadsafe versions of the functions in http.h: provided 0033 only for backwards compatibility. 0034 0035 */ 0036 0037 #ifdef __cplusplus 0038 extern "C" { 0039 #endif 0040 0041 #include <event2/event-config.h> 0042 #ifdef EVENT__HAVE_SYS_TYPES_H 0043 #include <sys/types.h> 0044 #endif 0045 #ifdef EVENT__HAVE_SYS_TIME_H 0046 #include <sys/time.h> 0047 #endif 0048 0049 /* For int types. */ 0050 #include <event2/util.h> 0051 0052 /** 0053 * Start an HTTP server on the specified address and port 0054 * 0055 * @deprecated It does not allow an event base to be specified 0056 * 0057 * @param address the address to which the HTTP server should be bound 0058 * @param port the port number on which the HTTP server should listen 0059 * @return a pointer to a newly initialized evhttp server structure 0060 * or NULL on error 0061 */ 0062 EVENT2_EXPORT_SYMBOL 0063 struct evhttp *evhttp_start(const char *address, ev_uint16_t port); 0064 0065 /** 0066 * A connection object that can be used to for making HTTP requests. The 0067 * connection object tries to establish the connection when it is given an 0068 * http request object. 0069 * 0070 * @deprecated It does not allow an event base to be specified 0071 */ 0072 EVENT2_EXPORT_SYMBOL 0073 struct evhttp_connection *evhttp_connection_new( 0074 const char *address, ev_uint16_t port); 0075 0076 /** 0077 * Associates an event base with the connection - can only be called 0078 * on a freshly created connection object that has not been used yet. 0079 * 0080 * @deprecated XXXX Why? 0081 */ 0082 EVENT2_EXPORT_SYMBOL 0083 void evhttp_connection_set_base(struct evhttp_connection *evcon, 0084 struct event_base *base); 0085 0086 0087 /** Returns the request URI */ 0088 #define evhttp_request_uri evhttp_request_get_uri 0089 0090 #ifdef __cplusplus 0091 } 0092 #endif 0093 0094 #endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |