|
From: | pv33 |
Subject: | [lwip-users] Long Latency Time |
Date: | Wed, 12 Dec 2012 15:12:36 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
Hi, On lwip 1.4, FreeRTOS 7.1.1, we have written a web server. The main part is static void http_server_netconn_thread(void *arg) { struct netconn *conn, *newconn; err_t err; /* Create a new TCP connection handle */ conn = netconn_new(NETCONN_TCP); if (conn!= NULL) { /* Bind to port 80 (HTTP) with default IP address */ err = netconn_bind(conn, NULL, 8002); if (err == ERR_OK) { /* Put the connection into LISTEN state */ netconn_listen(conn); while(1) { /* accept any icoming connection */ err = netconn_accept(conn, &newconn); if( err == ERR_OK ) { /* serve connection */ http_server_serve(newconn); /* delete connection */ netconn_delete(newconn); } } } else { printf("can not bind netconn"); } } else { printf("can not create netconn"); } } Every 2 seconds our server receives a request for a CRC value and if the value is changed a following request for a BMP picture which comes with a minimal delay after a CRC request. . We have found in Safari browser in Develop->Network logs: http://www.freeimagehosting.net/9aumg that there is a latency time for a reply on CRC request about 200 ms which seems to be very long. But if the server receives a second request, for a BMP file, in less than 10 ms, the latency time of the second request is only about 5 ms. Please, could anyone let us know how could we improve latency time of requests of CRC values? Thanks for any help and suggestion, Pavel . |
[Prev in Thread] | Current Thread | [Next in Thread] |