agentsociety.environment.utils.grpc¶
Module Contents¶
Functions¶
创建一个grpc的channel Create a grpc channel |
|
创建一个grpc的异步channel Create a grpc asynchronous channel |
Data¶
API¶
- agentsociety.environment.utils.grpc.__all__¶
[‘create_channel’, ‘create_aio_channel’]
- agentsociety.environment.utils.grpc.create_channel(server_address: str, secure: bool = False) grpc.Channel¶
创建一个grpc的channel Create a grpc channel
Args:
server_address (str): 服务器地址。server address.
secure (bool, optional): 是否使用安全连接. Defaults to False. Whether to use a secure connection. Defaults to False.
Returns:
grpc.Channel: grpc的channel。grpc channel.
- agentsociety.environment.utils.grpc.create_aio_channel(server_address: str, secure: bool = False) grpc.aio.Channel¶
创建一个grpc的异步channel Create a grpc asynchronous channel
Args:
server_address (str): 服务器地址。server address.
secure (bool, optional): 是否使用安全连接. Defaults to False. Whether to use a secure connection. Defaults to False.
Returns:
grpc.aio.Channel: grpc的异步channel。grpc asynchronous channel.