"lsquic.h" not enough, lsquic_stream_maybe_reset no avail for use
can you reorganize the structure of the API functions? for example, in your lsquic/bin/* examples you use many references to internal function declarations while they are not available from the public API
then what is the point of all these examples if they cannot be used via the API?
Thank you for pointing this out. We will review.
There are two instances in the example programs where this function is used. Both of these instances are for testing specific behaviors -- useful for development. This function is not meant for general use.
We could potentially place it in lsquic.h, but mark it as internal. I wonder whether there is a use case for this function in the general case. 🤔
as example to allow send http3 error codes https://datatracker.ietf.org/doc/html/draft-ietf-quic-http-23#section-8.1
https://github.com/litespeedtech/lsquic/blob/7e0c302ed8271c0019ea1155ebc9357bf4973f42/src/liblsquic/lsquic_hq.h#L65
These are all transport-level error codes -- the application should have no knowledge of them. Which error code do you think an application would ever be able to send?
nghttp3 thinking this is app level error codes https://github.com/ngtcp2/nghttp3/blob/164fbfa0f4da67d4c112bc6e5260846b5254b3cb/lib/includes/nghttp3/nghttp3.h#L353
openssl can send any of error codes https://github.com/openssl/openssl/blob/311f7bd6dd609cd32faa406bbddca580ae4fd4eb/doc/designs/quic-design/quic-api.md?plain=1#L547
also openssl api SSL_stream_reset with error codes
https://github.com/openssl/openssl/blob/311f7bd6dd609cd32faa406bbddca580ae4fd4eb/doc/designs/quic-design/quic-api.md?plain=1#L687
lsquic predates all of these and has been incorporated into web servers without needing to expose these error codes.
To summarize:
My view is that the internal functions should remain outside of the public API. The fact that they are used in example tools is fine: we have to test this thing somehow.
We can add comments to the example code to say something to the effect of "this is an internal function; we use it here to test X." At that point we can close this issue.