![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
demo versie 16/05
Dependencies: EthernetInterface mbed-rto mbed
Fork of ProjectVLC by
Diff: TCPlistener.cpp
- Revision:
- 21:fe6a58e84929
- Parent:
- 20:4997b02d6a88
- Child:
- 23:28e41b1c8a71
--- a/TCPlistener.cpp Wed Apr 18 13:58:46 2018 +0000 +++ b/TCPlistener.cpp Wed Apr 18 14:34:31 2018 +0000 @@ -9,28 +9,8 @@ server.bind(4000); server.listen(); server.set_blocking(true); - /* - for(int i=0;i<10;i++){ - connections[i]=0; - }*/ arraySize=10; } -/* -void TCPlistener::listen(){ - //server.listen(10);//Accept 10 connections at a time. - //Source:https://os.mbed.com/handbook/Socket - bool incomingConnection=true; - while(incomingConnection){ - TCPSocketConnection* connection=newConnection(); - if(connection!=0){ - if(server.accept(*connection)==-1) - incomingConnection=false; - else - connection->set_blocking(false); - printf("Connectie van: %s\n", connection->get_address()); - } - } -}*/ bool TCPlistener::receiveSegment(char *contents,int size){ printf("Maak een connectie.\r\n");