13. cc_udp

13.1. Communication Channel Via Udp

module:

cc_udp

synopsis:

Udp communication channel

class pykiso.lib.connectors.cc_udp.CCUdp(dest_ip, dest_port, **kwargs)[source]

UDP implementation of the coordination channel.

Initialize attributes.

Parameters:
  • dest_ip (str) – destination ip address

  • dest_port (int) – destination port

_cc_close()[source]

Close the udp socket.

Return type:

None

_cc_open()[source]

Open the udp socket.

Return type:

None

_cc_receive(timeout=1e-07)[source]

Read message from socket.

Parameters:

timeout (float) – timeout applied on receive event

Return type:

Dict[str, Optional[bytes]]

Returns:

dictionary containing the received bytes if successful, otherwise None

_cc_send(msg, **kwargs)[source]

Send message using udp socket

Parameters:
  • msg (bytes) – message to send, should bytes.

  • kwargs – not used

Return type:

None