![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
TCPlistener.h@35:efdbfccf2678, 2018-05-02 (annotated)
- Committer:
- KlaasGovaerts
- Date:
- Wed May 02 06:53:40 2018 +0000
- Revision:
- 35:efdbfccf2678
- Parent:
- 20:fe6a58e84929
- Child:
- 36:aa6c6c177be2
Added documentation
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 | 35:efdbfccf2678 | 8 | /** |
KlaasGovaerts | 35:efdbfccf2678 | 9 | * Class used to receive segments using TCP. |
KlaasGovaerts | 35:efdbfccf2678 | 10 | */ |
KlaasGovaerts | 4:0413d42377d1 | 11 | class TCPlistener{ |
KlaasGovaerts | 4:0413d42377d1 | 12 | private: |
KlaasGovaerts | 4:0413d42377d1 | 13 | EthernetInterface eth; |
KlaasGovaerts | 12:f3db7045e220 | 14 | TCPSocketServer server; |
KlaasGovaerts | 20:fe6a58e84929 | 15 | //TCPSocketConnection* connections[10]; |
KlaasGovaerts | 14:5f1fda6b9140 | 16 | int arraySize; |
KlaasGovaerts | 20:fe6a58e84929 | 17 | //TCPSocketConnection* newConnection(); |
KlaasGovaerts | 4:0413d42377d1 | 18 | public: |
KlaasGovaerts | 15:ffd311730575 | 19 | bool receiveSegment(char *contents,int size); |
KlaasGovaerts | 35:efdbfccf2678 | 20 | //void listen(); |
KlaasGovaerts | 4:0413d42377d1 | 21 | TCPlistener(); |
KlaasGovaerts | 4:0413d42377d1 | 22 | }; |
KlaasGovaerts | 4:0413d42377d1 | 23 | #endif |