Photon's request path is one Swift task per connection, running a synchronous parser and serializer between two awaits on raw bytes. It has no actors, no per-request tasks, and no Foundation on that path.
- Transport (
NetworkTransport): by default, non-blocking BSD sockets driven by kqueue on macOS and epoll on Linux (BSDEventLoop). On macOS, Network.framework is used for TLS and QUIC; on Linux, OpenSSL. Each kind of transport is wrapped in a smallByteStreamTransportprotocol withreceive,send,sendFileandclose. - Server (
HTTPServer): a structured task-group tree (server → listener → connection). Each connection picks its protocol once, from ALPN or the cleartext preface, and hands the transport to that protocol'sConnectionProtocol.run. - Connection loop (
HTTP1): one task owns the receive buffer, the parser and the connection state machine as local values