4. cc_mp_proxy
4.1. Multiprocessing Proxy Channel
- module:
cc_mp_proxy
- synopsis:
concrete implementation of a multiprocessing proxy channel
CCProxy channel was created, in order to enable the connection of multiple auxiliaries on one and only one CChannel. This CChannel has to be used with a so called proxy auxiliary.
- class pykiso.lib.connectors.cc_mp_proxy.CCMpProxy(**kwargs)[source]
Multiprocessing Proxy CChannel for multi auxiliary usage.
Initialize attributes.
- _bind_channel_info(proxy_aux)[source]
Bind a
MpProxyAuxiliaryinstance that is instanciated in order to handle the connection of multiple auxiliaries to a single communication channel in order to hide the underlying proxy setup.- Parameters:
proxy_aux (
MpProxyAuxiliary) – the proxy auxiliary instance that is holding the real communication channel.
- _cc_close()[source]
Close proxy channel.
Due to usage of multiprocessing the queue_in and queue_out state doesn’t have to change in order to ensure that ProxyAuxiliary works even if suspend or resume is called.
- Return type:
None
- _cc_open()[source]
Open proxy channel.
Due to usage of multiprocessing the queue_in and queue_out state doesn’t have to change in order to ensure that ProxyAuxiliary works even if suspend or resume is called.
- Return type:
None
- _cc_receive(timeout=0.1)[source]
Depopulate the queue out of the proxy connector.
- Parameters:
timeout (
float) – not used- Return type:
Union[Dict[str,Union[bytes,int]],Dict[str,Optional[bytes]],Dict[str,Optional[Message]],Dict[str,None]]- Returns:
bytes and source when it exist. if queue timeout is reached return None