src/Leevel/Protocol/RpcServer.php
protected function makeThriftServer(): ThriftServer
    {
        $service = new ThriftHandler();
        $processor = new ThriftProcessor($service);

        $socketTranport = new TServerSocket(
            $this->option['host'],
            (int) ($this->option['port'])
        );

        $outFactory = $inFactory = new TFramedTransportFactory();
        $outProtocol = $inProtocol = new TBinaryProtocolFactory();

        $server = new ThriftServer(
            $processor,
            $socketTranport,
            $inFactory,
            $outFactory,
            $inProtocol,
            $outProtocol
        );

        return $server;
    }
protected function makeThriftServer(): ThriftServer
    {
        $service = new ThriftHandler();
        $processor = new ThriftProcessor($service);

        $socketTranport = new TServerSocket(
            $this->option['host'],
            (int) ($this->option['port'])
        );

        $outFactory = $inFactory = new TFramedTransportFactory();
        $outProtocol = $inProtocol = new TBinaryProtocolFactory();

        $server = new ThriftServer(
            $processor,
            $socketTranport,
            $inFactory,
            $outFactory,
            $inProtocol,
            $outProtocol
        );

        return $server;
    }
创建 Thrift 服务

@return \Leevel\Protocol\Thrift\Base\ThriftServer