Repository navigation
Conversation
Serve routes, range requests, and the WebSocket session with zio-http 3.11.2, converting at the HTTP boundary via zio-interop-catz while keeping the cats-effect core unchanged. Co-authored-by: lavrov <lavrov@users.noreply.github.com>
Replace IOApp with ZIOAppDefault. Main.run is a ZIO for-comprehension that acquires a cats-effect Dispatcher via ZIO scope, serves zio-http routes directly, and converts to the cats-effect core only through fromEffect at the boundary. Co-authored-by: lavrov <lavrov@users.noreply.github.com>
TorrentRegistry, ServerTorrent, SocketSession, MetadataRegistry, Multiplexer, PieceStore, and TorrentIndex are now ZIO-native; cats effect remains only at the bittorrent library boundary via the new Interop helper. A new --no-dht argument skips DHT bootstrap with an empty PeerDiscovery so the HTTP and WebSocket layer can be smoke tested without network access. Co-authored-by: lavrov <lavrov@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IOcore (torrent registry, piece store, streams) unchanged; convert at the HTTP boundary viazio-interop-catz(fromEffect/toEffect, fs2Stream#translate+toZStream)Routes, byte-range handling withHeader.Range/Body.fromStream, and the WebSocket session withHandler.webSocket+ChannelEventorg.http4s.Uriimport fromServerTorrent.scalaVerification
./mill __.compilepassesGET /→ 200, torrent metadata/data routes → 404 for unknown torrents and invalid infohashes, negative file index rejected, WebSocket handshake → 101 andPing→Ponground-trip verified