aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* http: The big HTTP API refactoring of January 2025.v2.0.0-alpha.3http-client-transGarrett D'Amore2025-01-09
| | | | | | | | | | | | | | | | | | | | | | This represents a major change in the HTTP code base, consisting of a complete revamp of the HTTP API. The changes here are too numerous to mention, but the end result should be a vastly simpler API for both server and client applications. Many needless allocations were removed by providing fixed buffers for various parameters and headers when possible. A few bugs were fixed. Most especially we have fixed some bugs around very large URIs and headers, and we have also addressed conformance bugs to more closely conform to RFCs 9110 and 9112. As part of this work, the APIs for WebSockets changed slightly as well. In particular the properties available for accessing headers have changed. There is still documentation conversion work to do, and additional functionality (such as proper support for chunked transfers), but this is a big step in the right direction.
* Update CMakeLists.txtVũ Quang Thịnh2025-01-09
| | | Fix typo of filename. Can not find filename
* http: server callback API simplifiedGarrett D'Amore2025-01-06
| | | | | | | | | | This simplified API lets callbacks obtain the response from the connection objection directly, and does not require the aio to carry it as a parameter. Further, the request and response are both stored inline in the connection, reducing allocations. This is at present only for the server; the client will get a similar set of changes.
* http: changing transaction API to inline req and res structuresGarrett D'Amore2025-01-05
| | | | | This is a step towards simplifying this API and ultimately simplifying the HTTP callback API used for the server side.
* posix: move tcpdialer definition out of shared headerGarrett D'Amore2025-01-05
|
* platform: remove reader/writer locksGarrett D'Amore2025-01-05
| | | | | | The only thing using this was the transport lookups, but as those transports are now fully initialized in nng_init, we no longer need to lock that at all.
* platform: eliminate NNI_CV_INITIALIZER altogetherGarrett D'Amore2025-01-05
|
* reap: use sys init and fini instead of NNI_CV_INITIALIZER.Garrett D'Amore2025-01-05
| | | | The CV_INITIALIZER is error prone, as it cannot use cv_until.
* pthreads: avoid double indirection for cv mutexGarrett D'Amore2025-01-05
|
* Liberally apply some UWYI (use what you include) to header filesGarrett D'Amore2025-01-05
|
* args: Convert nng_opts_parse into a header only library using `nng_args_parse`.Garrett D'Amore2025-01-04
| | | | | | | | The API is identical, except that some names have changed, and this is now a header library in `nng/args.h` - so the core library does not need to carry this code in binaries. Being a header library also means it is not necessary to link against NNG, and it does not include any parts of NNG; it only depends on a standard C99 or C11 environment.
* api: Promote idhash supplemental API to coreGarrett D'Amore2025-01-04
|
* api: remove the supplemental platform.h headerGarrett D'Amore2025-01-04
|
* tests: make NUTS_PASS use TEST_ASSERTGarrett D'Amore2025-01-04
| | | | | This will ensure that we fast fail if a test cannot complete, rather than muddling on and reporting failures elsewhere.
* tests: TLS transport test resilience against EADDRINUSEGarrett D'Amore2025-01-04
| | | | This was occasionally causing "sigabrt" and similar failures in the tests.
* api: fold TLS supplemental headers into nng.hGarrett D'Amore2025-01-04
|
* api: remove old protocol headersGarrett D'Amore2025-01-04
|
* compat: remove unused leftover libnanomsg compatibility headersGarrett D'Amore2025-01-04
|
* api: rename nng_send_aio and nng_recv_aio to nng_socket_send and nng_socket_recvGarrett D'Amore2025-01-04
| | | | This aligns more closely with the nng_ctx functions.
* api: drop the 64-bit option accessors (no more 64-bit option types)Garrett D'Amore2025-01-03
|
* ipc: minor adjustments for ECLOSED and loggingGarrett D'Amore2025-01-03
|
* fixes #2061 Move IPC parameters from uint64 to intGarrett D'Amore2025-01-03
|
* api: remove unused _uint64 options accessors for contexts and socketsGarrett D'Amore2025-01-01
| | | | Also, clarification and add socket option docs for MAXRECVSZ, RECONNMINT, RECONNMAXT
* api: Remove the NNG_FLAG_ALLOCGarrett D'Amore2025-01-01
| | | | | | | | This flag failed to provide real zero copy that it was intended for, and it also involved extra allocations. Further, the API for it was brittle and error prone. Modern code should just work directly with nng_msg structures.
* demos: Demos do not need to use find_package for ThreadsGarrett D'Amore2025-01-01
| | | | | The CMAKE framework does this properly now by ensuring that nng uses nng_find_package for any of its own dependencies.
* cmake: ensure that MbedTLS and WolfSSL can be found properly as subprojectsGarrett D'Amore2025-01-01
| | | | | Using nng_find_package as the helper fixes this, by ensuring that the dependency gets properly added to incorporating projects.
* http: fix zero status code by defaultGarrett D'Amore2025-01-01
| | | | | This is a recent regression that affects any server that does not explicitly set an HTTP status code.
* base64: move it to private for websocketsGarrett D'Amore2025-01-01
| | | | | | There are no other consumers for this, and reasonably unlikely to be others for now. (Other use cases are JWTs, but that would be another whole set of functionality that we're not ready to take on.)
* sha1: move this to private websocket APIGarrett D'Amore2025-01-01
| | | | | | Nothing else uses it, and nothing else *should* use it because SHA1 is insecure. WebSockets have to use it by definition, unfortunately. The implementation is not very fast, but doesn't have to be for the use case of websocket keying.
* protocols: move content from the protocols to nng.hGarrett D'Amore2025-01-01
| | | | | This should simplify things for developers. Just one header to include in most cases now.
* tests: use zero port for performance testGarrett D'Amore2024-12-31
| | | | This is another occasional test failure due to EADDRINUSE that we can avoid.
* socket: rename nng_close to nng_socket_closeGarrett D'Amore2024-12-31
|
* websocket tests: more resilience against EADDRINUSEGarrett D'Amore2024-12-31
|
* pipes: fix crash caused by use after free race in rejectionGarrett D'Amore2024-12-30
|
* * MDF [core/socket] correct stat desc of rx_bytesJaylin2024-12-30
|
* poll poller: support concurrency for pollers using poll()Garrett D'Amore2024-12-30
|
* poller: port events scalability (illumos/Solaris)Garrett D'Amore2024-12-30
|
* fixes #530 POSIX pollqs should scale horizontally (epoll)Garrett D'Amore2024-12-30
| | | | | | | | This should help Linux platforms scale even further with NNG. Port events and *maybe* poll are the last to do. Probably select will remain left in the cold, because honestly select based systems are already performance constrained.
* kqueue: support concurrent pollersGarrett D'Amore2024-12-30
| | | | | | | | | | | | | This allows greatly increased scalability for kqueue based systems with lots of cores (more likely FreeBSD than Darwin, as most macs only have a smattering of cores), but even for macs we can engage a few cores for system calls giving improvements. The implementation here is pretty simple -- each file descriptor gets assigned to its own kqueue by taking the numeric value of the file descriptor modulo the number of kqueues we have opened. The same approach will be adopted for epoll and Solaris/illumos port events.
* ipc test: add a case for IPC that never connectsGarrett D'Amore2024-12-30
| | | | | | | This involved test-specific hacks, since connect() for UNIX domain sockets always completes synchronously one way or the other, even though it is documented that it might not. This found a bug, with an uninitialized poll FD as well!
* ipc/tcp stream tests: use dup() to avoid confusion and hang in teardownGarrett D'Amore2024-12-30
| | | | | This was observed only in the select poller, but the behavior of having the same file descriptor registered in the poller more than once is undefined.
* bump test timeouts for CI/CDGarrett D'Amore2024-12-30
|
* fixup! fixes #863 socket activation: for TCP and IPC (POSIX only)Garrett D'Amore2024-12-30
|
* socket activation: test fixes (improve coverage, etc.)Garrett D'Amore2024-12-30
|
* fixes #863 socket activation: for TCP and IPC (POSIX only)Garrett D'Amore2024-12-30
| | | | | | | | | This introduces a new option "NNG_OPT_LISTEN_FD", understood by TCP, TLS, and (on POSIX systems) IPC. This option is used to pass a file descriptor or handle (Windows) that is already listening (ready for ACCEPT to be called). For TCP and TLS, the socket must be of type AF_INET or AF_INET6, and for IPC it must be of type AF_UNIX.
* posix: fall back to send if sendmsg is unavailable for ipc and tcpGarrett D'Amore2024-12-29
| | | | | This will be slower, as each vector element has to be sent in a single system call, but for platforms that lack sendmsg it will at least work.
* aio: clear vector on advance (debugging aid)Garrett D'Amore2024-12-29
|
* aio test: add a test for IOV overrunGarrett D'Amore2024-12-29
|
* udp: use a bounce buffer if we lack sendmsg or recvmsgGarrett D'Amore2024-12-29
| | | | | This includes checks to determine if those functions are present, and a test case to verify that scatter gather with UDP works.
* resolver: add some additional test coverageGarrett D'Amore2024-12-29
| | | | | | While here, remove some code paths that do not occur by definition. (For example, if the resolver succeeds, we will definitely have a valid set of addresses, but if it fails, we will definitely not.)