Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-999

Add TForkingServer

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.7
    • PHP - Library
    • None
    • Patch Available

    Description

      The PHP libs only have TSimpleServer implemented currently. Given PHP supports forking through the PCNTL functions, it's possible to add a TForkingServer implementation, much akin to the perl library implementation.

      Example code usage:

      $processor = new SomeProcessor(new SomeHandler());
      $transport = new TServerSocket();
      $transport->setAcceptTimeout(1000);
      $transportFactory = new TTransportFactory();
      $protocolFactory = new TBinaryProtocolFactory();
      $server = new TForkingServer($processor, $transport, $transportFactory, $transportFactory, $protocolFactory, $protocolFactory);
      
      $server->serve();
      

      Attachments

        1. add-forking-server.patch
          3 kB
          Nick Jones

        Activity

          People

            nick-jones Nick Jones
            nick-jones Nick Jones
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: