aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/websocket/websocket_test.c
Commit message (Collapse)AuthorAge
* Replace nng_pipe_get_addr, nng_stream_get_addr, and the NNG_OPT_REMADDR option.Garrett D'Amore2025-10-27
| | | | | | | | | | | More direct access methods are provided instead. This results in much lower friction when using, and is a step on the path to removing NNG_OPT_LOCADDR as well. We need to figure a solution for NNG_OPT_LOCADDR for dialers; for listeners there is little use in it either, and it will be removed. (Dialers will probably get a new NNG_OPT_BIND_IP option.)
* Plumb sockaddrs all the way through pipes, make them failsafe.Garrett D'Amore2025-10-25
| | | | These functions can no longer fail.
* Add stream direct address functions for socket addresses.Garrett D'Amore2025-10-25
| | | | | | | | This is going to be used to facilitate debugging, and eliminate some inconveniences around these things. We plan to move the pipe functions to use these directly, hopefully moving away from the pipe_getopt hack. (The transport API will need to grow these. For now this is just the streams.)
* options: string options are passed by referenceGarrett D'Amore2025-10-07
| | | | | | | This avoids needless allocations, and we offer for pipes (which need this because they might be ephemeral) the get_strdup, get_strcpy, and get_strlen forms. (Those do the copying or allocations while holding the pipe reference.)
* 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.
* 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.
* websocket test: workaround EADDRINUSE during testsGarrett D'Amore2024-12-22
| | | | | These failures are responsible for false SEGFAULTS during testing, as we wind up failing to listen and then proceeding anyway.
* 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.
* websocket: fix for setting user headersGarrett D'Amore2024-11-05
| | | | This was a crasher bug (found by test suite).
* Remove untyped stream option functions.Garrett D'Amore2024-11-03
| | | | | The underlying stream APIs have no need for untyped accessors. Another step on the road to removal of NNI_TYPE_OPAQUE.
* Remove untyped nng_pipe_get, support for untyped sockaddr set.Garrett D'Amore2024-11-03
| | | | This is a step on the path to removing unsafe untyped option accesses.
* Remove nng_stream_set function family.Garrett D'Amore2024-10-28
| | | | This was not really used or useful.
* Move the rest of the functionality from platform.h into core.Garrett D'Amore2024-04-23
| | | | This also deprecates supplemental/util/platform.h.
* fixes #1346 windows ipc winsec fails frequently in CI/CDGarrett D'Amore2021-11-02
|
* New NUTS test framework (NNG Unit Test Support).Garrett D'Amore2020-11-23
| | | | | | | | | | | | | This is based on testutil/acutest, but is cleaner and fixes some short-comings. We will be adding more support for additional common paradigms to better facilitate transport tests. While here we added some more test cases, and fixed a possible symbol collision in the the stats framework (due to Linux use of a macro definition of "si_value" in a standard OS header). Test coverage may regress slightly as we are no longer using some of the legacy APIs.
* fixes #914 websocket stream mode should support TEXTGarrett D'Amore2020-10-26
| | | | | | | This adds new options, NNG_OPT_WS_SEND_TEXT and NNG_OPT_WS_RECV_TEXT that permit communication with WebSocket peers that insist on using TEXT frames (stream mode only). The support is limited, as NNG does no validation of the frame contents to check for UTF-8 compliance.
* fixes #1065 resolver leaks work structuresGarrett D'Amore2019-12-29
| | | | | | This includes changes to support setting the sanitizer *correctly* (the old code CMake stuff didn't quite get it right), and addresses a number of failures in the test code found by the address sanitizer.
* fixes #986 ws_read_finish_str free invalid pointerGarrett D'Amore2019-12-28
Also, this has refactored the websocket stream test to the new acutest.h, and includes a much deeper test of fragmentation and reassembly of websocket streams.