declearn.communication.build_client
Set up and return a NetworkClient communication endpoint.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
protocol |
str
|
Name of the communications protocol backend, based on which the Client subclass to instantiate will be retrieved. |
required |
server_uri |
str
|
Public uri of the server to which this client is to connect. |
required |
name |
str
|
Name of this client, reported to the server for logging and messages' addressing purposes. |
required |
certificate |
Optional[str]
|
Path to a certificate (publickey) PEM file, to use SSL/TLS communcations encryption. |
None
|
logger |
Union[logging.Logger, str, None]
|
Logger to use, or name of a logger to set up using
|
None
|
**kwargs |
Any
|
Any valid additional keyword parameter may be passed as well.
Refer to the target |
{}
|
Returns:
Name | Type | Description |
---|---|---|
client |
NetworkClient
|
NetworkClient communication endpoint instance. |
Source code in declearn/communication/utils/_build.py
60 61 62 63 64 65 66 67 68 69 70 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 |
|