11. cc_tcp_ip
11.1. Communication Channel via socket
- module
cc_socket
- synopsis
connector for communication via socket
- class pykiso.lib.connectors.cc_tcp_ip.CCTcpip(dest_ip, dest_port, max_msg_size=256, **kwargs)[source]
Connector channel used to communicate via socket
Initialize channel settings.
- Parameters
dest_ip (
str
) – destination ip addressdest_port (
int
) – destination portmax_msg_size (
int
) – the maximum amount of data to be received at once
- _cc_receive(timeout=0.01, raw=False)[source]
Read message from socket.
- Parameters
timeout – time in second to wait for reading a message
raw (
bool
) – should the message be returned raw or should it be interpreted as a pykiso.Message?
- Return type
Dict
[str
,Union
[bytes
,str
,None
]]- Returns
Message if successful, otherwise none