d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > [c] Problem Transferring Images With Sockets > Linux
Add Reply New Topic New Poll
Retired Moderator
Posts: 31,238
Joined: Nov 26 2006
Gold: 11,222.12
Trader: Trusted
Jul 11 2012 02:29am
I'm making a sort of a cloud program and I have issues with image transfers.
I'm using a 1024 bytes buffer to send the file from a client to the server, but when the images reach the server, they are corrupted and can't be open

the size of the file and the chars are exactly the same.

does anyone know what am I doing wrong?

thanks!
Member
Posts: 9,803
Joined: Jun 28 2005
Gold: 6.67
Jul 11 2012 02:54am
Maybe you don't open files in binary mode for the transfer? ("wb" and "rb" instead of "w" and "r")?
Retired Moderator
Posts: 31,238
Joined: Nov 26 2006
Gold: 11,222.12
Trader: Trusted
Jul 11 2012 03:32am
nah I'm using open and write, not fopen/fwrite

Anyway I got it working now, just transferred a big image and it's perfect
thanks :)
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll