Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

esp32: TCP data transfer to board does not complete #48

@robert-hh

Description

@robert-hh

Hello @dpgeorge and @nickzoic, thanks for fixing the last issue. If I go one step further, I run again into glitch. Extending my little test script as below, the transfer does not finish. The last partial block does not arrive. Build 3d903f5 and ESP8266 work. On the PC, I run:
cat testfile| nc -q 1 ip_address 13333

import socket

DATA_PORT = 13333

datasocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
datasocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
datasocket.bind(socket.getaddrinfo("0.0.0.0", DATA_PORT)[0][4])

datasocket.settimeout(None)
datasocket.listen(1)

dataclient, data_addr = datasocket.accept()
print("FTP Data connection from:", data_addr)

with open("testfile", "w") as file:
    chunk = dataclient.read(512)
    while len(chunk) > 0:
        file.write(chunk)
        chunk = dataclient.read(512)

dataclient.close()
datasocket.close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions