quiche icon indicating copy to clipboard operation
quiche copied to clipboard

Stream application error codes are not exposed to FFI

Open bwoebi opened this issue 2 years ago • 4 comments

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.

bwoebi avatar Dec 26 '23 23:12 bwoebi

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.

normanmaurer avatar Jan 24 '24 22:01 normanmaurer

Seems like a reasonable request but I have no strong opinion about whether we want to keep ABI compat or not.

LPardue avatar Jan 24 '24 22:01 LPardue

@LPardue fair enough... I am just saying I broke it before and @ghedo was ok with it :)

normanmaurer avatar Jan 24 '24 23:01 normanmaurer

Yep! I might lean on just adding a new field for overall simplicity

LPardue avatar Jan 24 '24 23:01 LPardue