'
Код: Выделить всё
socket_local = socket.create_connection((address, port))
socket_local.settimeout(0.001)
chunk_size=2048
def listen_message():
mybytes = b''
while True:
try:
chunk = socket_local.recv(chunk_size)
if not chunk:
break
mybytes+= chunk
if len(chunk)
Подробнее здесь: [url]https://stackoverflow.com/questions/78731480/socket-setup-and-handling-parital-messages-in-fix[/url]