Channel
class Channel (View source)
Class Channel
Methods
Construct an instance of the Channel class. If the $args array contains a "credentials" key mapping to a ChannelCredentials object, a secure channel will be created with those credentials.
Get the endpoint this call/stream is connected to
Get the connectivity state of the channel
Watch the connectivity state of the channel until it changed
Close the channel
Details
__construct(string $target, array $args = [])
Construct an instance of the Channel class. If the $args array contains a "credentials" key mapping to a ChannelCredentials object, a secure channel will be created with those credentials.
string
getTarget()
Get the endpoint this call/stream is connected to
int
getConnectivityState(bool $try_to_connect = false)
Get the connectivity state of the channel
bool
watchConnectivityState(int $last_state, Timeval $deadline_obj)
Watch the connectivity state of the channel until it changed
close()
Close the channel