update func desc

pull/7748/head
thinkerou 9 years ago
parent 6ce5228737
commit 03dc219896
  1. 15
      src/php/ext/grpc/call.c
  2. 3
      src/php/ext/grpc/channel.c
  3. 16
      src/php/ext/grpc/server.c
  4. 4
      src/php/ext/grpc/server_credentials.c
  5. 4
      src/php/ext/grpc/timeval.c

@ -69,8 +69,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_call)
}
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_call(zend_class_entry *class_type
TSRMLS_DC) {
PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_call);
@ -195,10 +195,11 @@ zval *grpc_php_wrap_call(grpc_call *wrapped, bool owned TSRMLS_DC) {
/**
* Constructs a new instance of the Call class.
* @param Channel $channel The channel to associate the call with. Must not be
* closed.
* @param Channel $channel_obj The channel to associate the call with.
* Must not be closed.
* @param string $method The method to call
* @param Timeval $absolute_deadline The deadline for completing the call
* @param Timeval $deadline_obj The deadline for completing the call
* @param string $host_override The host is set by user. (optional)
*/
PHP_METHOD(Call, __construct) {
zval *channel_obj;
@ -515,8 +516,8 @@ PHP_METHOD(Call, getPeer) {
}
/**
* Cancel the call. This will cause the call to end with STATUS_CANCELLED if it
* has not already ended with another status.
* Cancel the call. This will cause the call to end with STATUS_CANCELLED if
* it has not already ended with another status.
*/
PHP_METHOD(Call, cancel) {
wrapped_grpc_call *call = Z_WRAPPED_GRPC_CALL_P(getThis());

@ -125,7 +125,7 @@ void php_grpc_read_args_array(zval *args_array,
* "credentials" key mapping to a ChannelCredentials object, a secure channel
* will be created with those credentials.
* @param string $target The hostname to associate with this channel
* @param array $args The arguments to pass to the Channel (optional)
* @param array $args The arguments to pass to the Channel
*/
PHP_METHOD(Channel, __construct) {
wrapped_grpc_channel *channel = Z_WRAPPED_GRPC_CHANNEL_P(getThis());
@ -233,6 +233,7 @@ PHP_METHOD(Channel, watchConnectivityState) {
/**
* Close the channel
* @return void
*/
PHP_METHOD(Channel, close) {
wrapped_grpc_channel *channel = Z_WRAPPED_GRPC_CHANNEL_P(getThis());

@ -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());

@ -61,8 +61,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_server_credentials)
}
PHP_GRPC_FREE_WRAPPED_FUNC_END()
/* Initializes an instace of wrapped_grpc_server_credentials to be associated
* with an object of a class specified by class_type */
/* Initializes an instace of wrapped_grpc_server_credentials to be
* associated with an object of a class specified by class_type */
php_grpc_zend_object create_wrapped_grpc_server_credentials(
zend_class_entry *class_type TSRMLS_DC) {
PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_server_credentials);

@ -150,8 +150,8 @@ PHP_METHOD(Timeval, subtract) {
}
/**
* Return negative, 0, or positive according to whether a < b, a == b, or a > b
* respectively.
* Return negative, 0, or positive according to whether a < b, a == b,
* or a > b respectively.
* @param Timeval $a The first time to compare
* @param Timeval $b The second time to compare
* @return long

Loading…
Cancel
Save