Free (GPLv2) TCP/IP stack developed by TASS Belgium
Dependents: lpc1768-picotcp-demo ZeroMQ_PicoTCP_Publisher_demo TCPSocket_HelloWorld_PicoTCP Pico_TCP_UDP_Test ... more
PicoTCP. Copyright (c) 2013 TASS Belgium NV.
Released under the GNU General Public License, version 2.
Different licensing models may exist, at the sole discretion of the Copyright holders.
Official homepage: http://www.picotcp.com
Bug tracker: https://github.com/tass-belgium/picotcp/issues
Development steps:
initial integration with mbed RTOSgeneric mbed Ethernet driverhigh performance NXP LPC1768 specific Ethernet driverMulti-threading support for mbed RTOSBerkeley sockets and integration with the New Socket APIFork of the apps running on top of the New Socket APIScheduling optimizations- Debugging/benchmarking/testing
Demo application (measuring TCP sender performance):
Import programlpc1768-picotcp-demo
A PicoTCP demo app testing the ethernet throughput on the lpc1768 mbed board.
Diff: modules/pico_http_server.c
- Revision:
- 70:cd218dd180e5
- Parent:
- 68:0847e35d08a6
- Child:
- 73:dfb737147f6e
diff -r 43873e366ae1 -r cd218dd180e5 modules/pico_http_server.c --- a/modules/pico_http_server.c Wed Sep 25 12:20:39 2013 +0000 +++ b/modules/pico_http_server.c Thu Sep 26 07:05:22 2013 +0000 @@ -149,12 +149,12 @@ if( (ev & PICO_SOCK_EV_CLOSE) || (ev & PICO_SOCK_EV_FIN) ) { - server.wakeup(EV_HTTP_CLOSE,(serverEvent ? HTTP_SERVER_ID : client->connectionID)); + server.wakeup(EV_HTTP_CLOSE,(uint16_t)(serverEvent ? HTTP_SERVER_ID : client->connectionID)); } if(ev & PICO_SOCK_EV_ERR) { - server.wakeup(EV_HTTP_ERROR,(serverEvent ? HTTP_SERVER_ID : client->connectionID)); + server.wakeup(EV_HTTP_ERROR,(uint16_t)(serverEvent ? HTTP_SERVER_ID : client->connectionID)); } } @@ -162,11 +162,11 @@ * API for starting the server. If 0 is passed as a port, the port 80 * will be used. */ -int pico_http_server_start(uint16_t port, void (*wakeup)(uint16_t ev, uint16_t conn)) +int8_t pico_http_server_start(uint16_t port, void (*wakeup)(uint16_t ev, uint16_t conn)) { struct pico_ip4 anything = {0}; - server.port = port ? short_be(port) : short_be(80u); + server.port = (uint16_t)(port ? short_be(port) : short_be(80u)); if(!wakeup) { @@ -323,7 +323,7 @@ * To let the client know this is the last chunk, the user * should pass a NULL buffer. */ -int pico_http_submitData(uint16_t conn, void * buffer, int len) +int8_t pico_http_submitData(uint16_t conn, void * buffer, uint16_t len) { struct httpClient * client = findClient(conn); @@ -579,9 +579,9 @@ void sendData(struct httpClient * client) { - int length; + uint16_t length; while( client->bufferSent < client->bufferSize && - (length = pico_socket_write(client->sck,client->buffer+client->bufferSent,client->bufferSize-client->bufferSent)) > 0 ) + (length = (uint16_t)pico_socket_write(client->sck,client->buffer+client->bufferSent,client->bufferSize-client->bufferSent)) > 0 ) { client->bufferSent += length; server.wakeup(EV_HTTP_PROGRESS,client->connectionID);