Problem with sento() function in Socket Programming

Hello ev’rybody!.
I use sento() function to transmit data via UDP Protocol. This is the function: sendto(sock,buffer,size,0,…). If buffer is cont char (exam buffer=“string”), it’s OK. But, if buffer is unsigned char *(exam unsigned char buffer[100]) then, sent data by recvfrom() function is incorrect. Why?

Can you help me please?
Thanks
Hung.

you are probably passing wrong value in ‘size’ argument

Post your code, what you are saying doesn’t really make sense. If it doesn’t work it’s not because it’s and unsigned char poitner, it’s has to be something else.

Thanks for your reply!
Now It’s alright

Hung