First version

Dependencies:   mbed EthernetInterface mbed-rto

TCPlistener.h

Committer:
KlaasGovaerts
Date:
2018-04-18
Revision:
15:ffd311730575
Parent:
14:5f1fda6b9140
Child:
20:fe6a58e84929

File content as of revision 15:ffd311730575:

#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;
            TCPSocketConnection* connections[10];
            int arraySize;
            TCPSocketConnection* newConnection();
        public:
            bool receiveSegment(char *contents,int size);
            void listen();
            TCPlistener();
    };
#endif