Lab2_web / Mbed 2 deprecated webserverBlinky

Dependencies:   mbed

Fork of webserverBlinky by RealTimeCompLab2

Files at this revision

API Documentation at this revision

Comitter:
nixnax
Date:
Sat Jul 29 00:31:13 2017 +0000
Parent:
95:40af49390daf
Child:
97:bdf885e146dc
Commit message:
TCP Window size of 3*256

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jul 28 23:04:30 2017 +0000
+++ b/main.cpp	Sat Jul 29 00:31:13 2017 +0000
@@ -669,8 +669,8 @@
     int flagsOut = TCP_FLAG_ACK; // the default case is an ACK packet
     int flagsTCP = ((flagbitstcp[0]&1)<<8)|flagbitstcp[1]; // the tcp flags we received
 
-    windowsizetcp[0]=3; // ignore window size negotiation
-    windowsizetcp[1]=0; // ignore winodw size negotiation
+    windowsizetcp[0]=3; // tco window size = 3*256=768
+    windowsizetcp[1]=0; // tcp windows size low byte
 
     int doFin = 0; // flag to see if we have to send an extra FIN message to shut down the link
 
@@ -686,7 +686,6 @@
             break;
         case TCP_FLAG_ACK | TCP_FLAG_PSH:
             flagsOut = TCP_FLAG_ACK ; //| TCP_FLAG_FIN; // for every push we answer once AND close the link
-            windowsizetcp[0]=1; // reduce the receive window size even more
             if ( strncmp(tcpDataIn, "GET ", 4) == 0) { // check for an http GET command
                 dataLen = httpResponse(tcpDataOut); // send an http response
             }