Add prioritized transport, bounded reconnect, and configurable keepalive

Carry numeric priorities through encrypted RPC and adapter writers with bounded admission. Correct push semantics and socket lifecycle cleanup, expose dispatch gating, and add opt-in connection health.

Preserve the WebSocket setup API while allowing applications to override keepalive settings. Enable Android socket publication and document the 0.7.2-SNAPSHOT release workflow.
This commit is contained in:
sergeych committed 2026-10-15 08:36:34 +04:00
1 parent 0a52bb5c03
commit 617f22dda1
27 files changed
+1154 -295

No files matched your search

+39 -1
View File
@@ -309,4 +309,42 @@ export restrictions are lifted. We do not support such practices here at 8-rays.
[Sergey Chernov]: https://t.me/real_sergeych
[^1]: On some new Xiaomi phones we found problems with websocket binary frames, probably in ktor; use text frames
otherwise.
otherwise.
## Numeric transport priority (0.7.2-SNAPSHOT)
`call(command, args, priority = 100)` and `push(command, args, priority = 0)`
select numeric outgoing priority. Responses inherit request priority, calls remain
concurrent, and the framed wire extension interoperates with legacy peers.
See [priority API, compatibility and limits](PRIORITY.md).
## Connection health and WebSocket keepalive (0.7.2-SNAPSHOT)
Encrypted application heartbeat is opt-in: `KiloClientConnection.run()` does not
start it. Pass `ConnectionHealth` explicitly only when periodic probes are needed.
`ReconnectionOptions` configures connection deadlines, retry delay, and an optional
finite attempt budget; `reconnectExhausted` signals when that budget ends.
The server WebSocket helper retains its existing defaults and signature. Its new
configuration overload permits applications to disable the transport pinger:
```kotlin
setupWebsocketServer(api, path = "/rpc", serverKey = key,
configureWebSockets = { pingPeriodMillis = 0 }) { Session() }
```
Without heartbeat, applications must handle transport closure and bound real
request response times. A successful socket write does not prove peer reachability.
Proxy/NAT inactivity timeouts remain independent of these settings.
## Publishing
`./gradlew publishAllPublicationsToMavenRepository` publishes the configured
version to the private Gitea Maven registry using the existing local credential
file. Never commit that credential. Apple target publication requires a supported
macOS builder; check task output for skipped targets on other hosts.
`bin/pubdocs` generates Dokka and uploads it to the existing Kiloparsec documentation
site. For development-only Maven Local publication without configuring the remote
repository, pass `-PlocalPublishingOnly=true`.