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 RTOS
  • generic mbed Ethernet driver
  • high performance NXP LPC1768 specific Ethernet driver
  • Multi-threading support for mbed RTOS
  • Berkeley sockets and integration with the New Socket API
  • Fork of the apps running on top of the New Socket API
  • Scheduling 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.

Committer:
daniele
Date:
Sat Jun 08 13:48:10 2013 +0000
Revision:
20:3fa3db9fd4a4
Refactoring of the socket interface

Who changed what in which revision?

UserRevisionLine numberNew contents of line
daniele 20:3fa3db9fd4a4 1 /*
daniele 20:3fa3db9fd4a4 2 *
daniele 20:3fa3db9fd4a4 3 * PicoTCP Socket interface for mbed.
daniele 20:3fa3db9fd4a4 4 * Copyright (C) 2013 TASS Belgium NV
daniele 20:3fa3db9fd4a4 5 *
daniele 20:3fa3db9fd4a4 6 * Released under GPL v2
daniele 20:3fa3db9fd4a4 7 *
daniele 20:3fa3db9fd4a4 8 * Other licensing models might apply at the sole discretion of the copyright holders.
daniele 20:3fa3db9fd4a4 9 *
daniele 20:3fa3db9fd4a4 10 *
daniele 20:3fa3db9fd4a4 11 * This software is based on the mbed.org EthernetInterface implementation:
daniele 20:3fa3db9fd4a4 12 * Copyright (C) 2012 mbed.org, MIT License
daniele 20:3fa3db9fd4a4 13 *
daniele 20:3fa3db9fd4a4 14 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
daniele 20:3fa3db9fd4a4 15 * and associated documentation files (the "Software"), to deal in the Software without restriction,
daniele 20:3fa3db9fd4a4 16 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
daniele 20:3fa3db9fd4a4 17 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
daniele 20:3fa3db9fd4a4 18 * furnished to do so, subject to the following conditions:
daniele 20:3fa3db9fd4a4 19 *
daniele 20:3fa3db9fd4a4 20 * The above copyright notice and this permission notice shall be included in all copies or
daniele 20:3fa3db9fd4a4 21 * substantial portions of the Software.
daniele 20:3fa3db9fd4a4 22 *
daniele 20:3fa3db9fd4a4 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
daniele 20:3fa3db9fd4a4 24 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
daniele 20:3fa3db9fd4a4 25 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
daniele 20:3fa3db9fd4a4 26 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
daniele 20:3fa3db9fd4a4 27 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
daniele 20:3fa3db9fd4a4 28 */
daniele 20:3fa3db9fd4a4 29 #ifndef TCPSOCKETSERVER_H
daniele 20:3fa3db9fd4a4 30 #define TCPSOCKETSERVER_H
daniele 20:3fa3db9fd4a4 31
daniele 20:3fa3db9fd4a4 32 #include "Socket/Socket.h"
daniele 20:3fa3db9fd4a4 33 #include "wrapper.h"
daniele 20:3fa3db9fd4a4 34 #include "TCPSocketConnection.h"
daniele 20:3fa3db9fd4a4 35
daniele 20:3fa3db9fd4a4 36 /** TCP Server.
daniele 20:3fa3db9fd4a4 37 */
daniele 20:3fa3db9fd4a4 38 class TCPSocketServer : public Socket {
daniele 20:3fa3db9fd4a4 39 public:
daniele 20:3fa3db9fd4a4 40 /** Instantiate a TCP Server.
daniele 20:3fa3db9fd4a4 41 */
daniele 20:3fa3db9fd4a4 42 TCPSocketServer();
daniele 20:3fa3db9fd4a4 43
daniele 20:3fa3db9fd4a4 44 /** Bind a socket to a specific port.
daniele 20:3fa3db9fd4a4 45 \param port The port to listen for incoming connections on.
daniele 20:3fa3db9fd4a4 46 \return 0 on success, -1 on failure.
daniele 20:3fa3db9fd4a4 47 */
daniele 20:3fa3db9fd4a4 48 int bind(int port);
daniele 20:3fa3db9fd4a4 49
daniele 20:3fa3db9fd4a4 50 /** Start listening for incoming connections.
daniele 20:3fa3db9fd4a4 51 \param backlog number of pending connections that can be queued up at any
daniele 20:3fa3db9fd4a4 52 one time [Default: 1].
daniele 20:3fa3db9fd4a4 53 \return 0 on success, -1 on failure.
daniele 20:3fa3db9fd4a4 54 */
daniele 20:3fa3db9fd4a4 55 int listen(int backlog=1);
daniele 20:3fa3db9fd4a4 56
daniele 20:3fa3db9fd4a4 57 /** Accept a new connection.
daniele 20:3fa3db9fd4a4 58 \param connection A TCPSocketConnection instance that will handle the incoming connection.
daniele 20:3fa3db9fd4a4 59 \return 0 on success, -1 on failure.
daniele 20:3fa3db9fd4a4 60 */
daniele 20:3fa3db9fd4a4 61 int accept(TCPSocketConnection& connection);
daniele 20:3fa3db9fd4a4 62 };
daniele 20:3fa3db9fd4a4 63
daniele 20:3fa3db9fd4a4 64 #endif