NetX Duo FTP client packet pool

Licio MAPELLI 51 Reputation points
2022-03-29T13:43:59.323+00:00

Hello, when calling

nx_ftp_client_file_read(&ftp_client, &my_packet, 5*NX_IP_PERIODIC_RATE); 

the packet returned is allways from the IP packet pool despite the FTP client was created passing as argument its own packet pool:

nx_packet_pool_create(&ftp_client_pkt_pool, "FTP Client Packet Pool", FTP_PACKET_SIZE, ftp_client_memory, sizeof(ftp_client_memory));
nx_ftp_client_create(&ftp_client, "FTP Client", &ip_0, 2000, &ftp_client_pkt_pool);

is this normal ?
Thank you, regards

Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
331 questions
{count} votes

Accepted answer
  1. Bo Chen 596 Reputation points Microsoft Employee
    2022-04-06T00:40:41.947+00:00

    Hi @Licio MAPELLI thanks for your query, the ftp own packet pool is used by nx_ftp_client_packet_allocate() for sending data. For the reading operation (RETRIEVE command), this command causes the server to transfer a copy of the file, the data is from network (server), the client driver allocates the packet from IP packet pool for receiving data. For the writing operation (STOR), this command causes the server to accept the data, the ftp client may call nx_ftp_client_packet_allocate() to allocate the packet pool from FTP own packet pool, then sends data to server.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.