|
|
|
@ -53,10 +53,13 @@ cdef class AioChannel: |
|
|
|
|
|
|
|
|
|
def check_connectivity_state(self, bint try_to_connect): |
|
|
|
|
"""A Cython wrapper for Core's check connectivity state API.""" |
|
|
|
|
return grpc_channel_check_connectivity_state( |
|
|
|
|
self.channel, |
|
|
|
|
try_to_connect, |
|
|
|
|
) |
|
|
|
|
if self._status == AIO_CHANNEL_STATUS_DESTROYED: |
|
|
|
|
return ConnectivityState.shutdown |
|
|
|
|
else: |
|
|
|
|
return grpc_channel_check_connectivity_state( |
|
|
|
|
self.channel, |
|
|
|
|
try_to_connect, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
async def watch_connectivity_state(self, |
|
|
|
|
grpc_connectivity_state last_observed_state, |
|
|
|
@ -90,8 +93,8 @@ cdef class AioChannel: |
|
|
|
|
return True |
|
|
|
|
|
|
|
|
|
def close(self): |
|
|
|
|
grpc_channel_destroy(self.channel) |
|
|
|
|
self._status = AIO_CHANNEL_STATUS_DESTROYED |
|
|
|
|
grpc_channel_destroy(self.channel) |
|
|
|
|
|
|
|
|
|
def call(self, |
|
|
|
|
bytes method, |
|
|
|
|