8 years, 5 months ago.

TCP connection And other function together

Hi to all I want to write a code that my MBED do some function (in main loop). one of this function must checking for TCP connection but in MBED libraries there is following function :

server.accept(client); int k = client.receive(buffer, sizeof(buffer)) ;

when MBED wants to run the first function it stoped there until connection become succesfull if ignore this problem in second function MBED stopes untill recieve something from TCP socket but I want to do other function,and I dont want to stop any where

how I can fix this problem ??

Be the first to answer this question.