declearn.communication.build_server
Set up and return a NetworkServer communication endpoint.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
protocol |
str
|
Name of the communications protocol backend, based on which the Server subclass to instantiate will be retrieved. |
required |
host |
str
|
Host name (e.g. IP address) of the server. |
required |
port |
int
|
Communications port to use. |
required |
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
|
heartbeat |
float
|
Delay (in seconds) between verifications when checking for a message having beend received from or collected by a client. |
1.0
|
logger |
Union[logging.Logger, str, None]
|
Logger to use, or name of a logger to set up with
|
None
|
**kwargs |
Any
|
Any valid additional keyword parameter may be passed as well.
Refer to the target |
{}
|
Returns:
Name | Type | Description |
---|---|---|
server |
NetworkServer
|
NetworkServer communication endpoint instance. |
Source code in declearn/communication/utils/_build.py
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 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
|