Commits
Tarun Sukhani authored 873751d8fed
refactor(websocket)!: sealed event model + native switch, drop Promise/await (PF-147)
Replace the Play 1.2-era WebSocket controller API with a virtual-thread-native one.
The Netty handshake/codec/outbound-locking internals are unchanged; only the
controller-facing surface and its backing machinery change.
- Http.WebSocketEvent is now a sealed interface with TextFrame/BinaryFrame/
WebSocketClose records, so a switch over it is exhaustive.
- Http.Inbound implements Iterable<WebSocketEvent>; nextEvent() blocks the virtual
thread and returns the event directly -- no F.Promise, no await() continuations.
- Http.Outbound.send(byte opcode, byte[], int, int) -> sendBinary(byte[]).
- Remove WebSocketController.await(...) and the now-orphaned F.BlockingEventStream.
Adds the first server-side WebSocket integration test (OkHttp 5 WS client driving
an EchoSocket fixture over WS /wsEcho) and rewrites the asynchronous manual
(EN + JA) to the new API.
BREAKING CHANGE: WebSocket controllers must migrate from
`await(inbound.nextEvent())` + F.Matcher to
`for (WebSocketEvent e : inbound) switch (e) { ... }`, and from
`outbound.send(opcode, bytes, ...)` to `outbound.sendBinary(bytes)`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>