#include "channel.h"
#include <ext/standard/php_var.h>
#include <ext/standard/sha1.h>
#include <zend_smart_str.h>
#include <ext/spl/spl_exceptions.h>
#include <zend_exceptions.h>
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "completion_queue.h"
#include "channel_credentials.h"
#include "timeval.h"
Go to the source code of this file.
Variables | |
static zend_function_entry | channel_methods [] |
static gpr_mu | global_persistent_list_mu |
zend_class_entry * | grpc_ce_channel |
HashTable | grpc_persistent_list |
HashTable | grpc_target_upper_bound_map |
int | le_bound |
int | le_plink |
void create_and_add_channel_to_persistent_list | ( | wrapped_grpc_channel * | channel, |
char * | target, | ||
grpc_channel_args | args, | ||
wrapped_grpc_channel_credentials * | creds, | ||
char * | key, | ||
php_grpc_int | key_len, | ||
int target_upper_bound | TSRMLS_DC | ||
) |
void create_channel | ( | wrapped_grpc_channel * | channel, |
char * | target, | ||
grpc_channel_args | args, | ||
wrapped_grpc_channel_credentials * | creds | ||
) |
php_grpc_zend_object create_wrapped_grpc_channel | ( | zend_class_entry *class_type | TSRMLS_DC | ) |
void free_grpc_channel_wrapper | ( | grpc_channel_wrapper * | channel, |
bool | free_channel | ||
) |
void generate_sha1_str | ( | char * | sha1str, |
char * | str, | ||
php_grpc_int | len | ||
) |
|
static |
void php_grpc_channel_ref | ( | grpc_channel_wrapper * | wrapper | ) |
void php_grpc_channel_unref | ( | grpc_channel_wrapper * | wrapper | ) |
void php_grpc_delete_persistent_list_entry | ( | char * | key, |
php_grpc_int key_len | TSRMLS_DC | ||
) |
bool php_grpc_persistent_list_delete_unused_channel | ( | char * | target, |
target_bound_le_t *target_bound_status | TSRMLS_DC | ||
) |
int php_grpc_read_args_array | ( | zval * | args_array, |
grpc_channel_args *args | TSRMLS_DC | ||
) |
|
static |
PHP_METHOD | ( | Channel | , |
__construct | |||
) |
Construct an instance of the Channel class.
By default, the underlying grpc_channel is "persistent". That is, given the same set of parameters passed to the constructor, the same underlying grpc_channel will be returned.
If the $args array contains a "credentials" key mapping to a ChannelCredentials object, a secure channel will be created with those credentials.
If the $args array contains a "force_new" key mapping to a boolean value of "true", a new and separate underlying grpc_channel will be created and returned. This will not affect existing channels.
string | $target | The hostname to associate with this channel |
array | $args_array | The arguments to pass to the Channel |
PHP_METHOD | ( | Channel | , |
close | |||
) |
PHP_METHOD | ( | Channel | , |
getConnectivityState | |||
) |
PHP_METHOD | ( | Channel | , |
getTarget | |||
) |
PHP_METHOD | ( | Channel | , |
watchConnectivityState | |||
) |
Watch the connectivity state of the channel until it changed
long | $last_state | The previous connectivity state of the channel |
Timeval | $deadline_obj | The deadline this function should wait until |
target_bound_le_t* update_and_get_target_upper_bound | ( | char * | target, |
int | bound | ||
) |
|
static |
zend_class_entry* grpc_ce_channel |
class Channel
HashTable grpc_persistent_list |
Definition at line 45 of file php_grpc.c.
HashTable grpc_target_upper_bound_map |
Definition at line 46 of file php_grpc.c.