demo versie 16/05

Dependencies:   EthernetInterface mbed-rto mbed

Fork of ProjectVLC by Klaas Govaerts

Revision:
35:efdbfccf2678
Parent:
31:915f6cb7ffa5
Child:
36:aa6c6c177be2
--- a/TCPlistener.cpp	Wed Apr 25 14:51:18 2018 +0000
+++ b/TCPlistener.cpp	Wed May 02 06:53:40 2018 +0000
@@ -1,5 +1,9 @@
 #include "TCPlistener.h"
 
+/**
+* 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::TCPlistener(){
     char ip[]="192.168.0.253";
     char mask[]="255.255.255.0";
@@ -12,6 +16,12 @@
     arraySize=10;
 }
 
+/**
+* Receives all packets sent to 192.168.0.253:4000. The receive is non blocking.
+* @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 TCPlistener::receiveSegment(char *contents,int size){
     printf("Maak een connectie.\r\n");
     TCPSocketConnection client;