declearn.communication.grpc.GrpcServer
Bases: NetworkServer
Server-side communication endpoint using gRPC.
Source code in declearn/communication/grpc/_server.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
|
__init__(host='localhost', port=8765, certificate=None, private_key=None, password=None, logger=None)
Instantiate the server-side gRPC communications handler.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
host |
str, default
|
Host name (e.g. IP address) of the server. |
'localhost'
|
port |
int
|
Communications port to use. If set to 0, the gRPC runtime will choose one when the server is first started. |
8765
|
certificate |
Optional[str]
|
Path to the server certificate (publickey) to use SSL/TLS
communications encryption. If provided, |
None
|
private_key |
Optional[str]
|
Path to the server private key to use SSL/TLS communications
encryption. If provided, |
None
|
password |
Optional[str]
|
Optional password used to access |
None
|
logger |
Union[logging.Logger, str, None]
|
Logger to use, or name of a logger to set up with
|
None
|
Source code in declearn/communication/grpc/_server.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
start()
async
Start the gRPC server.
Source code in declearn/communication/grpc/_server.py
136 137 138 139 140 141 142 |
|
stop()
async
Stop the gRPC server and purge information about clients.
Source code in declearn/communication/grpc/_server.py
159 160 161 162 163 164 165 166 |
|