Speed up Webserver demo data rate by not sending a full ethernet frame each time, preventing the receiver from using a delayed ACK scheme which slows down the connection. TELNET server cleanup.
This commit is contained in:
parent
8154331da6
commit
c6f21fde62
7 changed files with 27 additions and 39 deletions
|
@ -31,7 +31,7 @@
|
|||
/** \file
|
||||
*
|
||||
* Simple HTTP Webserver Application. When connected to the uIP stack,
|
||||
* this will serve out files to HTTP clients.
|
||||
* this will serve out files to HTTP clients on port 80.
|
||||
*/
|
||||
|
||||
#define INCLUDE_FROM_HTTPSERVERAPP_C
|
||||
|
@ -270,8 +270,12 @@ static void HTTPServerApp_SendData(void)
|
|||
uip_tcp_appstate_t* const AppState = &uip_conn->appstate;
|
||||
char* const AppData = (char*)uip_appdata;
|
||||
|
||||
/* Must determine the maximum segment size to determine maximum file chunk size */
|
||||
uint16_t MaxSegmentSize = uip_mss();
|
||||
/* Must determine the maximum segment size to determine maximum file chunk size - never send a completely
|
||||
* full packet, as this will cause some hosts to start delaying ACKs until a non-full packet is received.
|
||||
* since uIP only allows one packet to be in transit at a time, this would cause long delays between packets
|
||||
* until the host times out and sends the ACK for the last received packet.
|
||||
*/
|
||||
uint16_t MaxSegmentSize = (uip_mss() >> 1);
|
||||
|
||||
/* Return file pointer to the last ACKed position */
|
||||
f_lseek(&AppState->HTTPServer.FileHandle, AppState->HTTPServer.ACKedFilePos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue