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.

------------

case TCPSOCKET_WRITEABLE: {

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 };

ByteToChar(b,m,27);

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

} break;

--------------

this is the whole program http://mbed.org/users/fyazgan/programs/12_TCPIP/luu4q5 if anyone can help me i ll be very glad. thank you.

26 Jul 2011

ANYONE?

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.