First version

Dependencies:   mbed EthernetInterface mbed-rto

TCPlistener.h

Committer:
KlaasGovaerts
Date:
2018-04-18
Revision:
12:f3db7045e220
Parent:
5:9903a0906a72
Child:
13:a6c651a1e51c

File content as of revision 12:f3db7045e220:

#include "mbed.h"
#include "EthernetInterface.h"
#include "TCPSocketServer.h"
#include "TCPSocketConnection.h"

#ifndef TCPLISTENER_H
#define TCPLISTENER_H
    class TCPlistener{
        private:
            EthernetInterface eth;
            TCPSocketServer server;
            Endpoint client;
            TCPSocketConnection *connections[10];
        public:
            void receivePacket(char *contents,int size);
            void listen();
            TCPlistener();
    };
#endif