Computing.Net > Forums > Programming > C++ file transfer

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

C++ file transfer

Reply to Message Icon

Name: Leith_Jones
Date: June 1, 2005 at 10:32:10 Pacific
OS: XP
CPU/Ram: 2.8GHz/512 RAM
Comment:

Having some trouble creating a file transfer server/client using C++ and Winsock2. The file is read into the client perfectly fine, but when I try and rewrite it, I get the same bytes 20-30 repeated until the end of file. Right now, I'm using TCP, and it works by simply sending the filename and file size in a send () first, followed by the data in a second send (). The filename and size are received perfectly fine, however, the data is totally corrupted. Is there something super mundane that I'm screwing up?



Sponsored Link
Ads by Google

Response Number 1
Name: Chi Happens
Date: June 1, 2005 at 11:11:56 Pacific
Reply:

dunno...need to see your code.

Chi


0

Response Number 2
Name: Leith_Jones
Date: June 1, 2005 at 14:17:45 Pacific
Reply:

I don't have the code here, I'll post it tomrorrow


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: C++ file transfer

file transfer with borland c++ builder www.computing.net/answers/programming/file-transfer-with-borland-c-builder/177.html

Adding copy to c:\files on send to menu www.computing.net/answers/programming/adding-copy-to-cfiles-on-send-to-menu/261.html

c++ file I/O, open/close file www.computing.net/answers/programming/c-file-io-openclose-file/11306.html