aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/Webserver/Lib/uIPManagement.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-02-18 02:19:43 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-02-18 02:19:43 +0000
commit3b6987bca3ef746fd9a5d4baec6d40b65c9b4101 (patch)
treecd2c69da65d47a0bba638c07431cfc893422be87 /Projects/Webserver/Lib/uIPManagement.c
parentc77b30e9e6069c893b8461e104e7893762ed81a7 (diff)
downloadlufa-3b6987bca3ef746fd9a5d4baec6d40b65c9b4101.tar.gz
lufa-3b6987bca3ef746fd9a5d4baec6d40b65c9b4101.tar.bz2
lufa-3b6987bca3ef746fd9a5d4baec6d40b65c9b4101.zip
Add uIP-split code to the Webserver project, so that each packet is split in half to avoid the delayed-ACK problem when communicating with other devices. Condense HTTP server code, so that the HTTP headers are all sent from the one state. Make default filename append to any directory URI, rather than just the root directory.
Diffstat (limited to 'Projects/Webserver/Lib/uIPManagement.c')
-rw-r--r--Projects/Webserver/Lib/uIPManagement.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/Projects/Webserver/Lib/uIPManagement.c b/Projects/Webserver/Lib/uIPManagement.c
index 18e355bde..13829c56b 100644
--- a/Projects/Webserver/Lib/uIPManagement.c
+++ b/Projects/Webserver/Lib/uIPManagement.c
@@ -52,7 +52,7 @@ void uIPManagement_Init(void)
{
/* uIP Timing Initialization */
clock_init();
- timer_set(&ConnectionTimer, CLOCK_SECOND / 10);
+ timer_set(&ConnectionTimer, CLOCK_SECOND / 5);
timer_set(&ARPTimer, CLOCK_SECOND * 10);
/* uIP Stack Initialization */
@@ -153,7 +153,7 @@ static void uIPManagement_ProcessIncomingPacket(void)
/* Add destination MAC to outgoing packet */
uip_arp_out();
- RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
+ uip_split_output();
}
break;
@@ -163,7 +163,7 @@ static void uIPManagement_ProcessIncomingPacket(void)
/* If a response was generated, send it */
if (uip_len > 0)
- RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
+ uip_split_output();
break;
}
@@ -186,7 +186,8 @@ static void uIPManagement_ManageConnections(void)
/* Add destination MAC to outgoing packet */
uip_arp_out();
- RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
+ /* Split and send the outgoing packet */
+ uip_split_output();
}
}
@@ -208,7 +209,8 @@ static void uIPManagement_ManageConnections(void)
/* Add destination MAC to outgoing packet */
uip_arp_out();
- RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
+ /* Split and send the outgoing packet */
+ uip_split_output();
}
}
@@ -224,7 +226,8 @@ static void uIPManagement_ManageConnections(void)
/* Add destination MAC to outgoing packet */
uip_arp_out();
- RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
+ /* Split and send the outgoing packet */
+ uip_split_output();
}
}
#endif