Ok... but does it have the *correct* text content? byte by byte?
The junk at the end is from what I explained about the send not using the read size when sending data...
Ok... but does it have the *correct* text content? byte by byte?
The junk at the end is from what I explained about the send not using the read size when sending data...
here's the receiver content (the 'damaged' one):
original .txt:61 6C 67 75 6D 20 74 65 78 74 6F 0A 74 65 78 74 6F 0A 66 69 6D 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
61 6C 67 75 6D 20 74 65 78 74 6F 0A 74 65 78 74 6F 0A 66 69 6D 0A
it's the same info, except for the '00' characters
You'll have to use the return value of fread/recv to:
1. Make sure your read succeeded.
2. Find out how many bytes to send/write.
hi thanks for your replies...
i did what you said (read nš of bytes from fread and send them) and it's working
thank you for your help and your patience
Best regards