class Server (View source)

Class Server

Methods

__construct(array $args)

Constructs a new instance of the Server class

requestCall(int $tag_new, int $tag_cancel)

Request a call on a server. Creates a single GRPC_SERVER_RPC_NEW event.

bool
addHttp2Port(string $addr)

Add a http2 over tcp listener.

bool
addSecureHttp2Port(string $addr, ServerCredentials $creds_obj)

Add a secure http2 over tcp listener.

start()

Start a server - tells all listeners to start listening

Details

__construct(array $args)

Constructs a new instance of the Server class

Parameters

array $args

The arguments to pass to the server (optional)

requestCall(int $tag_new, int $tag_cancel)

Request a call on a server. Creates a single GRPC_SERVER_RPC_NEW event.

Parameters

int $tag_new

The tag to associate with the new request

int $tag_cancel

The tag to use if the call is cancelled

bool addHttp2Port(string $addr)

Add a http2 over tcp listener.

Parameters

string $addr

The address to add

Return Value

bool

true on success, false on failure

bool addSecureHttp2Port(string $addr, ServerCredentials $creds_obj)

Add a secure http2 over tcp listener.

Parameters

string $addr

The address to add

ServerCredentials $creds_obj

Return Value

bool

true on success, false on failure

start()

Start a server - tells all listeners to start listening