Client identification added
This commit is contained in:
parent
3e6e74f976
commit
d9bdc909e9
@ -53,6 +53,7 @@ class tcp_base(object):
|
||||
LOG_PREFIX = 'TCP_IP:'
|
||||
RX_LENGTH = 0xff
|
||||
COM_TIMEOUT = 0.5
|
||||
IS_CLIENT = False
|
||||
|
||||
def __init__(self, host, port, rx_log_lvl=logging.INFO):
|
||||
self.host = host
|
||||
@ -289,6 +290,8 @@ class tcp_client(tcp_base):
|
||||
|
||||
.. literalinclude:: ../../tcp_socket/_examples_/tcp_socket__tcp_client.log
|
||||
"""
|
||||
IS_CLIENT = True
|
||||
|
||||
def __connect__(self):
|
||||
if self.__socket__ is None:
|
||||
# Create a TCP/IP socket
|
||||
|
Loading…
x
Reference in New Issue
Block a user