Understanding `toHttpApp()` Function in `HttpRpcRouter.ts`

I’m digging into the source code a bit, especially @effect/rpc-http/src/HttpRpcRouter.ts -->

I was thinking that the toHttpApp() function would handle a stream of http requests, and call the handler for each requests flowing into that stream.
However the implementation is different from what I imagined. Could anyone please explain these 2 lines? (https://github.com/Effect-TS/effect/blob/cc3b5bab66e33326c95e80eb5cce08b9efca8207/packages/rpc-http/src/HttpRpcRouter.ts#L25)

const context = fiber.getFiberRef(FiberRef.currentContext)
const request = Context.unsafeGet(context, ServerRequest.HttpServerRequest)
Was this page helpful?