demo versie 16/05
Dependencies: EthernetInterface mbed-rto mbed
Fork of ProjectVLC by
TCPlistener.h
- Committer:
- KlaasGovaerts
- Date:
- 2018-05-15
- Revision:
- 75:31c15986b85e
- Parent:
- 67:0b634db67ca8
- Child:
- 76:c0c7c3f37be2
File content as of revision 75:31c15986b85e:
#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; public: /** * Initialise with ip address of 192.168.0.253, a mask of 255.255.255.0 and a gateway of 192.168.0.254. * Starts a TCP server which will listen on port 4000. */ TCPlistener(); /** * Receives all packets sent to 192.168.0.253:4000. * @param contents The location where the segment contents will be written, formatted as null terminated character array. * @param size The max size of the "contents" array. * @return True if a segment was received, false if no segment was received. */ bool receiveSegment(char *contents,int size); }; #endif