|
|
|
@ -72,8 +72,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_server) |
|
|
|
|
} |
|
|
|
|
PHP_GRPC_FREE_WRAPPED_FUNC_END() |
|
|
|
|
|
|
|
|
|
/* Initializes an instance of wrapped_grpc_call to be associated with an object
|
|
|
|
|
* of a class specified by class_type */ |
|
|
|
|
/* Initializes an instance of wrapped_grpc_call to be associated with an
|
|
|
|
|
* object of a class specified by class_type */ |
|
|
|
|
php_grpc_zend_object create_wrapped_grpc_server(zend_class_entry *class_type |
|
|
|
|
TSRMLS_DC) { |
|
|
|
|
PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_server); |
|
|
|
@ -116,7 +116,7 @@ PHP_METHOD(Server, __construct) { |
|
|
|
|
* Request a call on a server. Creates a single GRPC_SERVER_RPC_NEW event. |
|
|
|
|
* @param long $tag_new The tag to associate with the new request |
|
|
|
|
* @param long $tag_cancel The tag to use if the call is cancelled |
|
|
|
|
* @return Void |
|
|
|
|
* @return void |
|
|
|
|
*/ |
|
|
|
|
PHP_METHOD(Server, requestCall) { |
|
|
|
|
grpc_call_error error_code; |
|
|
|
@ -180,7 +180,7 @@ PHP_METHOD(Server, requestCall) { |
|
|
|
|
/**
|
|
|
|
|
* Add a http2 over tcp listener. |
|
|
|
|
* @param string $addr The address to add |
|
|
|
|
* @return true on success, false on failure |
|
|
|
|
* @return bool true on success, false on failure |
|
|
|
|
*/ |
|
|
|
|
PHP_METHOD(Server, addHttp2Port) { |
|
|
|
|
const char *addr; |
|
|
|
@ -197,6 +197,12 @@ PHP_METHOD(Server, addHttp2Port) { |
|
|
|
|
RETURN_LONG(grpc_server_add_insecure_http2_port(server->wrapped, addr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Add a secure http2 over tcp listener. |
|
|
|
|
* @param string $addr The address to add |
|
|
|
|
* @param ServerCredentials The ServerCredentials object |
|
|
|
|
* @return bool true on success, false on failure |
|
|
|
|
*/ |
|
|
|
|
PHP_METHOD(Server, addSecureHttp2Port) { |
|
|
|
|
const char *addr; |
|
|
|
|
php_grpc_int addr_len; |
|
|
|
@ -220,7 +226,7 @@ PHP_METHOD(Server, addSecureHttp2Port) { |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Start a server - tells all listeners to start listening |
|
|
|
|
* @return Void |
|
|
|
|
* @return void |
|
|
|
|
*/ |
|
|
|
|
PHP_METHOD(Server, start) { |
|
|
|
|
wrapped_grpc_server *server = Z_WRAPPED_GRPC_SERVER_P(getThis()); |
|
|
|
|