ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
ftp_session.h File Reference

FTP client session driver: the two sockets the ftp.h codec deliberately does not own. More...

#include "protocore_config.h"

Go to the source code of this file.

Detailed Description

FTP client session driver: the two sockets the ftp.h codec deliberately does not own.

ftp.h is pure bytes-on-the-wire. This is the other half: it drives a real control connection (protocore_client_*) through the RFC 959 login -> TYPE I -> passive-mode -> transfer -> QUIT sequence, opens the second (data) connection the server names, and streams a payload across it.

The payload is pulled, not pushed: the caller supplies a protocore_ftp_source that fills a chunk at a given offset. So the bytes can come from anywhere - a file, a sensor log, or the core-dump partition (protocore_exc_coredump_read) - without this owner knowing about any of them, and nothing ever has to fit in RAM at once.

Non-blocking: a call advances the sequence as far as the sockets allow, then reports ::PROTOCORE_FTP_BUSY. A reply is bounded by PROTOCORE_FTP_TIMEOUT_MS.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file ftp_session.h.