When set, and when not using a transparent proxy, unauth chat
connections will be made over H2 instead of HTTP/1.1. Auth connections
will not be affected.
This required some changes to jni::ResultTypeInfo, because we no
longer have tokens available for the JNI types of a bridged function
to use with the jni_args! macro. Instead, we record signatures for
each type that might appear as a callback argument and use
const_str::concat to put them together.
This does not currently attempt to autogenerate the Java interface on
the other side of the bridge; given the way gen_java_decl builds on
top of cbindgen, this is likely tricky but not impossible. Something
to possibly add later.
This only applies to chat connections (including registration), and
for the time being is specifically looking for self-signed
certificates. Even though self-signed certificates can occur on any
network access, there should always be a chat connection early enough
in the app lifetime to identify the problem. (Other connections will
still log the error appropriately.)
If an incoming message notification comes in after the Java connection
object or listener has been GC'd, the ack handle would be leaked; now
it's properly cleaned up even on early exit.
- Java: This distinction is already made, just reworded
- Node: We include "protocol errors" in IoError here, where retrying
probably won't help, but it won't really be harmful either.
- Swift: Automatically retryable errors are now enumerated; other
errors are still described as "manually retryable". (Also, fixed a
redundant error message format call.)
Essentially, promotes "decide whether an HTTP status is interesting"
up to the generic "enclave" handling instead of being CDS-specific,
and then propagates the new case all the way out to apps.
The same error is being used both for timeouts and for "all attempts
failed"; if we're going to coalesce them (reasonable, given that the
only option in either case is "retry" or "don't"), "all attempts
failed" is a less misleading choice.
This changes the particular enum case in Swift from connectionTimedOut
to connectionFailed. Java continues to use NetworkException and
TypeScript the IoError code.