aboutsummaryrefslogtreecommitdiff
path: root/demo
Commit message (Collapse)AuthorAge
* demos: fix async clientKyle Schwarz2025-06-12
| | | | platform.h was removed with 7cdba96
* Fix typos across docs, comments, and CMakemochalins2025-06-02
|
* 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.
* 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: 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.
* demos: raw and async demos should use nng_initGarrett D'Amore2025-01-01
|
* demo: call nng_init in http_clientGarrett D'Amore2025-01-01
|
* demo: fix reqrep demo to use nng_initGarrett D'Amore2025-01-01
|
* demo: fix rest server (must initialize NNG library)Garrett D'Amore2025-01-01
|
* demos: fix pubsub_forwarder to call nng_initGarrett D'Amore2025-01-01
|
* stream demo: fix compilation, add server modeGarrett D'Amore2025-01-01
| | | | This is tested and shown to work now.
* socket: rename nng_close to nng_socket_closeGarrett D'Amore2024-12-31
|
* Enhance demo/async/ to allow async dial by clientBrian Carcich2024-12-31
| | | | | | | | | | demo/async/client.c - Enable client, on dial, to wait for server that has not yet started demo/async/arun.sh - Run async demo with arbitrary start order of server wrt clients
* demos: bump cmake version required to 3.15Garrett D'Amore2024-12-29
| | | | | | | This fixes problems finding the threads library. There may still be problems building these with TLS libraries added, as those dependencies may not be satisfied if the library lacks a cmake configuration file.
* zerotier: removedGarrett D'Amore2024-12-26
| | | | | | | | | | All vestiges of ZeroTier have been removed. Also, as consequence, some binary values have changed (specifically the number of the address family used for NNG_AF_ABSTRACT.) We may create a new ZeroTier transport that makes use of lwIP to provide for ZeroTier and native host network coexistence, without requiring ZeroTier to participate in the native networking stack.
* nng_http_server_collect_body now void return (API break)Garrett D'Amore2024-12-22
|
* http: method on request structure is now staticGarrett D'Amore2024-12-22
| | | | | This saves yet another allocation. It also no longer returns a value making this a breaking change.
* streams: add explicit stop functionsGarrett D'Amore2024-12-12
| | | | | | | | | | | | This allows us to explicitly stop streams, dialers, and listeners, before we start tearing down things. This hopefully will be useful in resolving use-after-free bugs in http, tls, and websockets. The new functions are not yet documented, but they are nng_stream_stop, nng_stream_dialer_stop, and nng_stream_listener_stop. They should be called after close, and before free. The close functions now close without blocking, but the stop function is allowed to block.
* Add a nng_stream example paired with a socket server on win/linuxHugo Lindström2024-01-01
|
* typozheng shuyuan2023-08-23
| | | change message to function name
* Follow clang-format defined styleC-o-r-E2023-08-23
|
* Add forwarder demoC-o-r-E2023-08-23
|
* Correct an error (#1569)RealSense3D2022-01-27
|
* update demos to not use deprecated functions (#1531)Edward Rudd2021-11-27
|
* Use env shebangs everywhere (#1515)Leonard Pollak2021-10-26
| | | | Change all shebangs to use '#!/usr/bin/env bash'. This increases portability to platforms which do not cohere to the FHS.
* Extend the reqdep demo with ZeroTier transport (#1439)janjaapbos2021-04-10
| | | | | * Extend the reqdep demo with ZeroTier transport * tab indentation
* Fix typos in commentsEvgeny Ermakov2020-02-13
|
* Fix error checkstromgy2020-02-13
| | | | Most error codes in `nng_errno_enum` are positve values, so the existing error check would not catch something like `NNG_ECONNREFUSED`.
* Remove redundant <sys/time.h> include. It is not used but prevents demos ↵Evgeny Kravchenko2019-06-27
| | | | from being compiled on Windows.
* fixes #817 demo/rest does not workGarrett D'Amore2018-12-16
|
* fixes #612 demo/raw needs updating to use raw socket constructorGarrett D'Amore2018-08-06
|
* fixes #508 nng_aio_free blocks during callbackGarrett D'Amore2018-06-07
| | | | | | | | | | | | | | | | This recycles the job structures, and so the demo seems to work. If you have sufficient concurrency, these aio structures will ultimately leak (with the level of concurrency), but for this demo that's fine. (To keep them from leaking, you'd walk the freelist and discard them just before exiting. The actual growth of the list should be quite small.) There are other strategies that could be used to avoid uncontrolled growth, but they aren't useful for our demo purposes. Also, when we have a fix for 511, we can go ahead and just do a deferred discard. As aios are used *heavily* in the code, the strategy of a deferred cache may help reduce presssure on the heap, andd might be something we want to explore for the core.
* fixes #486 Revisit SOVERSION and VERSIONGarrett D'Amore2018-05-25
| | | | | | | | | | | | | | | | | | | | | | fixes #485 Honor BUILD_SHARED_LIBS fixes #483 Don't expose private symbols in shared library fixes #481 Export CMake target This is a "large" commit involving changes that don't affect the code directly, but which have an impact on how we package and build our project. The most significant of these changes is that we now build only either a shared or a static library, depending on the setting of the BUILD_SHARED_LIBS option. We also suppress private symbols from being exposed when the underlying toolchain lets us do so. Minor updates to the way we version the ABI are used, and we now have a nice exported CMake project. To import this project in another, simply do find_package(nng) and you can add target_link_libraries(nng::nng) to your targets. CMake does the rest for you.
* Remove some unused variables.Garrett D'Amore2018-04-12
|
* Use contexts for new async demo.Garrett D'Amore2018-04-12
|
* fixes #341 Want REST API gateway demoGarrett D'Amore2018-04-11
|
* fixes #284 want async demoGarrett D'Amore2018-03-12
|
* Fix copyright, reflow code.Garrett D'Amore2018-03-02
|
* fixes #234 Investigate enabling more verbose compiler warningsGarrett D'Amore2018-02-14
| | | | | | | We enabled verbose compiler warnings, and found a lot of issues. Some of these were even real bugs. As a bonus, we actually save some initialization steps in the compat layer, and avoid passing some variables we don't need.
* Add reqrep demo, but demonstrate zero copy, and sending binary data.Garrett D'Amore2018-02-08
|
* Introduce simple HTTP client demo application.Garrett D'Amore2018-02-07