Application structure
Server does not require an MVC layout. Separate bootstrap, transport handlers and application services so a network callback does not also own configuration and business logic.
my-app/ composer.json composer.lock server.php src/ Application/ Transport/ tests/server.php loads Composer, reads configuration, creates listeners and calls Server::runAll. Transport adapts Request/messages to application calls. Application validates input and executes use cases. Create external database/HTTP clients within worker lifecycle instead of sharing inherited sockets.
Inject dependencies through constructors/closures. Keep request state in separate objects and static registries at process scope. Separate codecs from handlers so framing can be tested without launching the application.