☰
d2jsp
Rules
Help
Forum Gold FAQ
Live Streams
Photo Gallery
Hourly Raffle
Ladder Slasher
Log In
Register
Log In
Register
Account Recovery
Resend Validation Email
d2jsp Forums
>
Off-Topic
>
Computers & IT
>
Programming & Development
> [c] Problem Transferring Images With Sockets > Linux
Add Reply
New Topic
New Poll
Views: 345
Replies: 2
Track Topic
EpiLOL
Retired Moderator
Posts: 31,238
Joined: Nov 26 2006
Gold
:
11,222.12
Trader:
Trusted
#1
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!
KrzaQ2
Member
Posts: 9,803
Joined: Jun 28 2005
Gold
:
6.67
#2
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")?
EpiLOL
Retired Moderator
Posts: 31,238
Joined: Nov 26 2006
Gold
:
11,222.12
Trader:
Trusted
#3
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
© 2003-2026 d2jsp
Contact