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

C++ file transfer

Reply to Message Icon

Original Message
Name: Leith_Jones
Date: June 1, 2005 at 10:32:10 Pacific
Subject: C++ file transfer
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?


Report Offensive Message For Removal


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

dunno...need to see your code.

Chi


Report Offensive Follow Up For Removal

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

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


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: C++ file transfer

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes Today.
Discuss in The Lounge