demo versie 16/05
Dependencies: EthernetInterface mbed-rto mbed
Fork of ProjectVLC by
TCPlistener.h@36:aa6c6c177be2, 2018-05-02 (annotated)
- Committer:
- KlaasGovaerts
- Date:
- Wed May 02 08:11:42 2018 +0000
- Revision:
- 36:aa6c6c177be2
- Parent:
- 35:efdbfccf2678
Samengevoegde versie
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
KlaasGovaerts | 5:0413d42377d1 | 1 | #include "mbed.h" |
KlaasGovaerts | 5:0413d42377d1 | 2 | #include "EthernetInterface.h" |
KlaasGovaerts | 13:f3db7045e220 | 3 | #include "TCPSocketServer.h" |
KlaasGovaerts | 13:f3db7045e220 | 4 | #include "TCPSocketConnection.h" |
KlaasGovaerts | 5:0413d42377d1 | 5 | |
KlaasGovaerts | 5:0413d42377d1 | 6 | #ifndef TCPLISTENER_H |
KlaasGovaerts | 5: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 | 5:0413d42377d1 | 11 | class TCPlistener{ |
KlaasGovaerts | 5:0413d42377d1 | 12 | private: |
KlaasGovaerts | 5:0413d42377d1 | 13 | EthernetInterface eth; |
KlaasGovaerts | 13:f3db7045e220 | 14 | TCPSocketServer server; |
KlaasGovaerts | 21:fe6a58e84929 | 15 | //TCPSocketConnection* connections[10]; |
KlaasGovaerts | 36:aa6c6c177be2 | 16 | //int arraySize; |
KlaasGovaerts | 21:fe6a58e84929 | 17 | //TCPSocketConnection* newConnection(); |
KlaasGovaerts | 5:0413d42377d1 | 18 | public: |
KlaasGovaerts | 16:ffd311730575 | 19 | bool receiveSegment(char *contents,int size); |
KlaasGovaerts | 35:efdbfccf2678 | 20 | //void listen(); |
KlaasGovaerts | 5:0413d42377d1 | 21 | TCPlistener(); |
KlaasGovaerts | 5:0413d42377d1 | 22 | }; |
KlaasGovaerts | 5:0413d42377d1 | 23 | #endif |