aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/libevent/http-internal.h
diff options
context:
space:
mode:
authorkikht <kikht@yandex-team.ru>2022-02-10 16:45:14 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:14 +0300
commit194cae0e8855b11be2005e1eff12c660c3ee9774 (patch)
treeed29c437b616690880c017855ebe0be34fdf81a2 /contrib/libs/libevent/http-internal.h
parent49116032d905455a7b1c994e4a696afc885c1e71 (diff)
downloadydb-194cae0e8855b11be2005e1eff12c660c3ee9774.tar.gz
Restoring authorship annotation for <kikht@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/libevent/http-internal.h')
-rw-r--r--contrib/libs/libevent/http-internal.h88
1 files changed, 44 insertions, 44 deletions
diff --git a/contrib/libs/libevent/http-internal.h b/contrib/libs/libevent/http-internal.h
index 85760eafc2..9f199eced7 100644
--- a/contrib/libs/libevent/http-internal.h
+++ b/contrib/libs/libevent/http-internal.h
@@ -7,8 +7,8 @@
* need to know about these.
*/
-#ifndef HTTP_INTERNAL_H_INCLUDED_
-#define HTTP_INTERNAL_H_INCLUDED_
+#ifndef HTTP_INTERNAL_H_INCLUDED_
+#define HTTP_INTERNAL_H_INCLUDED_
#include "event2/event_struct.h"
#include "util-internal.h"
@@ -32,7 +32,7 @@ struct addrinfo;
struct evhttp_request;
/* Indicates an unknown request method. */
-#define EVHTTP_REQ_UNKNOWN_ (1<<15)
+#define EVHTTP_REQ_UNKNOWN_ (1<<15)
enum evhttp_connection_state {
EVCON_DISCONNECTED, /**< not currently connected not trying either*/
@@ -62,30 +62,30 @@ struct evhttp_connection {
struct event retry_ev; /* for retrying connects */
char *bind_address; /* address to use for binding the src */
- ev_uint16_t bind_port; /* local port for binding the src */
+ ev_uint16_t bind_port; /* local port for binding the src */
char *address; /* address to connect to */
- ev_uint16_t port;
+ ev_uint16_t port;
size_t max_headers_size;
ev_uint64_t max_body_size;
int flags;
-#define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */
-#define EVHTTP_CON_OUTGOING 0x0002 /* multiple requests possible */
-#define EVHTTP_CON_CLOSEDETECT 0x0004 /* detecting if persistent close */
-/* set when we want to auto free the connection */
-#define EVHTTP_CON_AUTOFREE EVHTTP_CON_PUBLIC_FLAGS_END
-/* Installed when attempt to read HTTP error after write failed, see
- * EVHTTP_CON_READ_ON_WRITE_ERROR */
-#define EVHTTP_CON_READING_ERROR (EVHTTP_CON_AUTOFREE << 1)
-
- struct timeval timeout; /* timeout for events */
+#define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */
+#define EVHTTP_CON_OUTGOING 0x0002 /* multiple requests possible */
+#define EVHTTP_CON_CLOSEDETECT 0x0004 /* detecting if persistent close */
+/* set when we want to auto free the connection */
+#define EVHTTP_CON_AUTOFREE EVHTTP_CON_PUBLIC_FLAGS_END
+/* Installed when attempt to read HTTP error after write failed, see
+ * EVHTTP_CON_READ_ON_WRITE_ERROR */
+#define EVHTTP_CON_READING_ERROR (EVHTTP_CON_AUTOFREE << 1)
+
+ struct timeval timeout; /* timeout for events */
int retry_cnt; /* retry count */
int retry_max; /* maximum number of retries */
- struct timeval initial_retry_timeout; /* Timeout for low long to wait
- * after first failing attempt
- * before retry */
+ struct timeval initial_retry_timeout; /* Timeout for low long to wait
+ * after first failing attempt
+ * before retry */
enum evhttp_connection_state state;
@@ -100,11 +100,11 @@ struct evhttp_connection {
void (*closecb)(struct evhttp_connection *, void *);
void *closecb_arg;
- struct event_callback read_more_deferred_cb;
+ struct event_callback read_more_deferred_cb;
struct event_base *base;
struct evdns_base *dns_base;
- int ai_family;
+ int ai_family;
};
/* A callback for an http server */
@@ -142,7 +142,7 @@ struct evhttp {
/* All listeners for this host */
TAILQ_HEAD(boundq, evhttp_bound_socket) sockets;
- TAILQ_HEAD(httpcbq, evhttp_cb) callbacks;
+ TAILQ_HEAD(httpcbq, evhttp_cb) callbacks;
/* All live connections on this host. */
struct evconq connections;
@@ -154,12 +154,12 @@ struct evhttp {
/* NULL if this server is not a vhost */
char *vhost_pattern;
- struct timeval timeout;
+ struct timeval timeout;
size_t default_max_headers_size;
ev_uint64_t default_max_body_size;
- int flags;
- const char *default_content_type;
+ int flags;
+ const char *default_content_type;
/* Bitmask of all HTTP methods that we accept and pass to user
* callbacks. */
@@ -178,33 +178,33 @@ struct evhttp {
/* XXX most of these functions could be static. */
/* resets the connection; can be reused for more requests */
-void evhttp_connection_reset_(struct evhttp_connection *);
+void evhttp_connection_reset_(struct evhttp_connection *);
/* connects if necessary */
-int evhttp_connection_connect_(struct evhttp_connection *);
+int evhttp_connection_connect_(struct evhttp_connection *);
-enum evhttp_request_error;
+enum evhttp_request_error;
/* notifies the current request that it failed; resets connection */
-EVENT2_EXPORT_SYMBOL
-void evhttp_connection_fail_(struct evhttp_connection *,
- enum evhttp_request_error error);
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_fail_(struct evhttp_connection *,
+ enum evhttp_request_error error);
enum message_read_status;
-EVENT2_EXPORT_SYMBOL
-enum message_read_status evhttp_parse_firstline_(struct evhttp_request *, struct evbuffer*);
-EVENT2_EXPORT_SYMBOL
-enum message_read_status evhttp_parse_headers_(struct evhttp_request *, struct evbuffer*);
+EVENT2_EXPORT_SYMBOL
+enum message_read_status evhttp_parse_firstline_(struct evhttp_request *, struct evbuffer*);
+EVENT2_EXPORT_SYMBOL
+enum message_read_status evhttp_parse_headers_(struct evhttp_request *, struct evbuffer*);
-void evhttp_start_read_(struct evhttp_connection *);
-void evhttp_start_write_(struct evhttp_connection *);
+void evhttp_start_read_(struct evhttp_connection *);
+void evhttp_start_write_(struct evhttp_connection *);
/* response sending HTML the data in the buffer */
-void evhttp_response_code_(struct evhttp_request *, int, const char *);
-void evhttp_send_page_(struct evhttp_request *, struct evbuffer *);
-
-EVENT2_EXPORT_SYMBOL
-int evhttp_decode_uri_internal(const char *uri, size_t length,
- char *ret, int decode_plus);
-
-#endif /* HTTP_INTERNAL_H_INCLUDED_ */
+void evhttp_response_code_(struct evhttp_request *, int, const char *);
+void evhttp_send_page_(struct evhttp_request *, struct evbuffer *);
+
+EVENT2_EXPORT_SYMBOL
+int evhttp_decode_uri_internal(const char *uri, size_t length,
+ char *ret, int decode_plus);
+
+#endif /* HTTP_INTERNAL_H_INCLUDED_ */