![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
TCPlistener.h@13:a6c651a1e51c, 2018-04-18 (annotated)
- Committer:
- KlaasGovaerts
- Date:
- Wed Apr 18 08:09:56 2018 +0000
- Revision:
- 13:a6c651a1e51c
- Parent:
- 12:f3db7045e220
- Child:
- 14:5f1fda6b9140
Versie 18/04 (2)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
KlaasGovaerts | 4:0413d42377d1 | 1 | #include "mbed.h" |
KlaasGovaerts | 4:0413d42377d1 | 2 | #include "EthernetInterface.h" |
KlaasGovaerts | 12:f3db7045e220 | 3 | #include "TCPSocketServer.h" |
KlaasGovaerts | 12:f3db7045e220 | 4 | #include "TCPSocketConnection.h" |
KlaasGovaerts | 4:0413d42377d1 | 5 | |
KlaasGovaerts | 4:0413d42377d1 | 6 | #ifndef TCPLISTENER_H |
KlaasGovaerts | 4:0413d42377d1 | 7 | #define TCPLISTENER_H |
KlaasGovaerts | 4:0413d42377d1 | 8 | class TCPlistener{ |
KlaasGovaerts | 4:0413d42377d1 | 9 | private: |
KlaasGovaerts | 4:0413d42377d1 | 10 | EthernetInterface eth; |
KlaasGovaerts | 12:f3db7045e220 | 11 | TCPSocketServer server; |
KlaasGovaerts | 4:0413d42377d1 | 12 | Endpoint client; |
KlaasGovaerts | 12:f3db7045e220 | 13 | TCPSocketConnection *connections[10]; |
KlaasGovaerts | 13:a6c651a1e51c | 14 | TCPSocketConnection * newConnection(TCPSocketConnection **connectionArray,int arraySize); |
KlaasGovaerts | 4:0413d42377d1 | 15 | public: |
KlaasGovaerts | 4:0413d42377d1 | 16 | void receivePacket(char *contents,int size); |
KlaasGovaerts | 12:f3db7045e220 | 17 | void listen(); |
KlaasGovaerts | 4:0413d42377d1 | 18 | TCPlistener(); |
KlaasGovaerts | 4:0413d42377d1 | 19 | }; |
KlaasGovaerts | 4:0413d42377d1 | 20 | #endif |