Cant Send Data Continuously to Pc viaTcp As A Client.

24 Jul 2011

i ve a problem about tcp ip stack i connect to the pc as a client i can only send 5 or 6 messages after that it stops sendind i think i ve a problem about sending procedure.



char m[29]; int b[29] = { 2, 0, 0, 0, 2,0,0,0,15,0,0,0,85,49,64,t0,t1,t2,t3,255,255,255,255,255,255,255,255,255,255 };


int sendError = socket.send(m,sizeof(m));

} break;


this is the whole program if anyone can help me i ll be very glad. thank you.

26 Jul 2011


26 Jul 2011

if you insert a small delay after sending a packet, does it keep working then ?

24 Oct 2013

You must set socket.set_blocking() to "false" before sending. Don't forget to reset to "true" after sending.