Stream application error codes are not exposed to FFI
Using quiche via FFI will sometimes return Error::StreamReset or Error::StreamStopped. Which is just -15 or -16, without the attached application error code; these errors are generally returned with quiche_conn_stream_send() and quiche_conn_stream_recv().
I'd expect these functions to optionally be able to return the application error code on connection end.
I would do a PR, but I don't know about the ABI compatibility guarantees, my favourite way of implementation would be just adding an additional uint64_t *error_code parameter, which is assigned to if the error is StreamReset or StreamStopped.
If ABI compatibility is important, we'll need a new function. I honestly don't have a great idea of a name for these though. quiche_conn_stream_send_ex()? quiche_conn_stream_send2()? quiche_conn_stream_send_with_optional_error()? I don't know.
I would love to have this as well. From my experience doing other PRs it is fine to break the API here. That said I am not a project member, just a contributor.
Seems like a reasonable request but I have no strong opinion about whether we want to keep ABI compat or not.
@LPardue fair enough... I am just saying I broke it before and @ghedo was ok with it :)
Yep! I might lean on just adding a new field for overall simplicity