[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] tcp_connect: order of events

From: Tom C. Barker
Subject: [lwip-users] tcp_connect: order of events
Date: Fri, 25 Feb 2005 09:09:41 -0800


In resolving my ftp issues, I have found that on connection
I want to send data to the client. To fill in some detail, in one
mode of ftp file retrieval, the client can ask for a file (from port 21)
and then have a listening socket (on port 20) accept the file. 

Upon connection, then I want my lwIP-based ftp server to send the 
file (immediately), but I find that if I do, I get strange delays 
happening, namely the ACK goes out _after_ the data. In fact 
tcp_connect is coded this way (by the way, "sucessfully" is spelled 
wrong in the following comment if a developer would care to change 
it to "successfully").

      /* Call the user specified function to call when sucessfully
       * connected. */
      TCP_EVENT_CONNECTED(pcb, ERR_OK, err);

Can I reverse this order so to have

      TCP_EVENT_CONNECTED(pcb, ERR_OK, err);

or will this cause a problem with the stack?

I know that POLL can eventually call the code to send 
the file, but I'd like to expedite the process.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]