src/WorkerF/App.php
public static function run(TcpConnection $con)
    {
        try {
            // build config
            $conf = Config::get('app');
            // get request
            $request = new Requests();

            // check global middlewares
            $global_middlerwares = Config::get('middleware.global');
            $result = Middleware::run($global_middlerwares, $request);
            // middlewares check passed?
            if ($result instanceof Requests) {
                // run dispatch
                $result = Route::dispatch($result);
            }
            
        } catch (\Exception $e) {
            // Handle Exception
            $exceptionHandler = IOCContainer::getInstanceWithSingleton(ExceptionHandler::class);

            $result = $exceptionHandler->handle($e);
            
        } finally {
            // return Response data
            $response = Response::bulid($result, $conf);
            $con->send($response);
        }
    }
public static function run(TcpConnection $con)
    {
        try {
            // build config
            $conf = Config::get('app');
            // get request
            $request = new Requests();

            // check global middlewares
            $global_middlerwares = Config::get('middleware.global');
            $result = Middleware::run($global_middlerwares, $request);
            // middlewares check passed?
            if ($result instanceof Requests) {
                // run dispatch
                $result = Route::dispatch($result);
            }
            
        } catch (\Exception $e) {
            // Handle Exception
            $exceptionHandler = IOCContainer::getInstanceWithSingleton(ExceptionHandler::class);

            $result = $exceptionHandler->handle($e);
            
        } finally {
            // return Response data
            $response = Response::bulid($result, $conf);
            $con->send($response);
        }
    }
run http app.

@param  Workerman\Connection\TcpConnection $con
@return void
@throws \LogicException
@throws \BadMethodCallException
@throws \InvalidArgumentException
@throws \PDOException