From 3dae30ed5e543dc73fc993334ef56b9b157b9b3c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 24 Jan 2018 17:38:16 -0800 Subject: fixes #173 Define public HTTP server API This introduces enough of the HTTP API to support fully server applications, including creation of websocket style protocols, pluggable handlers, and so forth. We have also introduced scatter/gather I/O (rudimentary) for aios, and made other enhancements to the AIO framework. The internals of the AIOs themselves are now fully private, and we have eliminated the aio->a_addr member, with plans to remove the pipe and possibly message members as well. A few other minor issues were found and fixed as well. The HTTP API includes request, response, and connection objects, which can be used with both servers and clients. It also defines the HTTP server and handler objects, which support server applications. Support for client applications will require a client object to be exposed, and that should be happening shortly. None of this is "documented" yet, bug again, we will follow up shortly. --- src/core/defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/defs.h') diff --git a/src/core/defs.h b/src/core/defs.h index fbf074b4..dbbccf58 100644 --- a/src/core/defs.h +++ b/src/core/defs.h @@ -30,12 +30,14 @@ #define NNI_NUM_ELEMENTS(x) (sizeof(x) / sizeof((x)[0])) // These types are common but have names shared with user space. +// Internal code should use these names when possible. typedef struct nng_msg nni_msg; typedef struct nng_sockaddr nni_sockaddr; typedef struct nng_event nni_event; typedef struct nng_notify nni_notify; typedef struct nng_url nni_url; typedef struct nng_iov nni_iov; +typedef struct nng_aio nni_aio; // These are our own names. typedef struct nni_socket nni_sock; @@ -62,8 +64,6 @@ typedef int nni_signal; // Wakeup channel. typedef uint64_t nni_time; // Abs. time (ms). typedef int32_t nni_duration; // Rel. time (ms). -typedef struct nni_aio nni_aio; - typedef void (*nni_cb)(void *); // Notify descriptor. -- cgit v1.2.3-70-g09d2