\swooleRpcServer

Generic class for a Thrift server.

Summary

Methods
Properties
Constants
serve()
stop()
handleRequest()
__construct()
onStart()
notice()
onReceive()
No public properties found
No constants found
No protected methods found
$processor_
$transport_
$inputTransportFactory_
$outputTransportFactory_
$inputProtocolFactory_
$outputProtocolFactory_
$processor
$serviceName
N/A
No private methods found
No private properties found
N/A

Properties

$processor_

$processor_ : \Thrift\Server\TProcessor

Processor to handle new clients

Type

\Thrift\Server\TProcessor

$transport_

$transport_ : \Thrift\Server\TServerTransport

Server transport to be used for listening and accepting new clients

Type

\Thrift\Server\TServerTransport

$processor

$processor : 

Type

$serviceName

$serviceName : 

Type

Methods

serve()

serve() : void

Serves the server. This should never return unless a problem permits it to do so or it is interrupted intentionally

stop()

stop() : void

Stops the server serving

handleRequest()

handleRequest(\Thrift\Server\TTransport  $transport) 

Parameters

\Thrift\Server\TTransport $transport

__construct()

__construct(object  $processor, \Thrift\Server\TServerTransport  $transport, \Thrift\Factory\TTransportFactory  $inputTransportFactory, \Thrift\Factory\TTransportFactory  $outputTransportFactory, \Thrift\Factory\TProtocolFactory  $inputProtocolFactory, \Thrift\Factory\TProtocolFactory  $outputProtocolFactory) : void

Sets up all the factories, etc

Parameters

object $processor
\Thrift\Server\TServerTransport $transport
\Thrift\Factory\TTransportFactory $inputTransportFactory
\Thrift\Factory\TTransportFactory $outputTransportFactory
\Thrift\Factory\TProtocolFactory $inputProtocolFactory
\Thrift\Factory\TProtocolFactory $outputProtocolFactory

onStart()

onStart() 

notice()

notice(  $log) 

Parameters

$log

onReceive()

onReceive(  $serv,   $fd,   $from_id,   $data) 

Parameters

$serv
$fd
$from_id
$data