class Yar_Server (View source)

Class Yar_Server Date 2018/6/9 下午3:02

Properties

protected $_executor

Methods

__construct(object $obj, $protocol = null)

Register a server Set up a Yar HTTP RPC Server, All the public methods of $obj will be register as a RPC service.

bool
handle()

Start RPC Server Start a RPC HTTP server, and ready for accpet RPC requests.

Details

final __construct(object $obj, $protocol = null)

Register a server Set up a Yar HTTP RPC Server, All the public methods of $obj will be register as a RPC service.

Yar_Server constructor.

Parameters

object $obj

An Object, all public methods of its will be registered as RPC services.

$protocol

bool handle()

Start RPC Server Start a RPC HTTP server, and ready for accpet RPC requests.

Note: Usual RPC calls will be issued as HTTP POST requests. If a HTTP GET request is issued to the uri, the service information (commented section above) will be printed on the page

Return Value

bool