Showing posts with label userdata gram protocol. Show all posts
Showing posts with label userdata gram protocol. Show all posts

Thursday, 29 November 2012

How to Send 0x00 as Hex data over UDP protocol?

While to send hex data over UserDataGram protocol i.e

char buffer[20]={0xEA,0xEB,0x00,0x01,0xFE};

addrlen = sizeof(struct sockaddr_in);
sendto( s, buffer, strlen(buffer)+1, 0, (struct sockaddr*)&addr, addrlen );
At client side am receiving only 0xEA,0xEB

Ooops,

0x00 consider as null and data after this, is not sending.Can anyone give solution for this?.