13. cc_udp_server
13.1. Communication Channel via UDP server
- module
cc_udp_server
- synopsis
basic UDP server
Warning
if multiple clients are connected to this server, ensure that each client receives all necessary responses before receiving messages again. Otherwise the responses may be sent to the wrong client
- class pykiso.lib.connectors.cc_udp_server.CCUdpServer(dest_ip, dest_port, **kwargs)[source]
Connector channel used to set up an UDP server.
Initialize attributes.
- Parameters
dest_ip (
str
) – destination portdest_port (
int
) – destination port
- _cc_receive(timeout=1e-07, raw=False)[source]
Read message from UDP socket.
- Parameters
timeout – timeout applied on receive event
raw (
bool
) – should the message be returned raw or should it be interpreted as a pykiso.Message?
- Return type
Union
[Message
,bytes
,None
]- Returns
Message if successful, otherwise none