Click here to Skip to main content
15,924,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CArray woes Pin
Christian Graus26-Dec-02 10:12
protectorChristian Graus26-Dec-02 10:12 
GeneralMMC tutorial required Pin
FASTian25-Dec-02 22:48
FASTian25-Dec-02 22:48 
Generalediting a menu Pin
citroen25-Dec-02 22:46
citroen25-Dec-02 22:46 
GeneralAdding WTL controls to MFC projects Pin
Hockey25-Dec-02 21:39
Hockey25-Dec-02 21:39 
QuestionLZH decompression? Pin
Dov Sherman25-Dec-02 20:00
Dov Sherman25-Dec-02 20:00 
AnswerRe: LZH decompression? Pin
Mike Nordell26-Dec-02 6:29
Mike Nordell26-Dec-02 6:29 
GeneralActiveX control Pin
chepuri_uk25-Dec-02 19:59
chepuri_uk25-Dec-02 19:59 
GeneralWSARecv and IOCP :: Winsock Pin
valikac25-Dec-02 19:34
valikac25-Dec-02 19:34 
Hi.

I am working on a network client and one of its features is download files over HTTP server, i.e. www.abc-xyz.com/files.exe. The program downloads some files successfully, but it fails to download some files. For some reason, it download the all files, but some files are unvalid in terms of CRC.

I understand that the server initially sends information about a file including its size and type (Content-Type). However, for some reason files that have bad CRC seem to miss the beginning chunk of data. In other words, the program does the file, but the first twenty bytes might contain bad CRC. Here is the algorithm of the design.

- Send request (GET)
- Call WSARecv
- On first incoming data, analyze data and determine file size.
- Analyze data and save any valid data that server might have including with file information.
- Call WSARecv
- Continue calling WSARecv and appending new data until size of data equals the size that the server sent.

I would like to know is it possible that the server sends out the data before it sends out information about the data such as size? With the algorithm above, the program can download some file, but fails other files in terms of CRC. I cannot understand how that is possible because the size of the file is correct most of the time, but even so the files have bad CRC. Another interesting fact is that the bad CRC always occurs at the beginning such as the first 20 bytes.

Thanks,
Kuphryn
GeneralRe: WSARecv and IOCP :: Winsock Pin
RobJones26-Dec-02 5:20
RobJones26-Dec-02 5:20 
GeneralRe: WSARecv and IOCP :: Winsock Pin
valikac26-Dec-02 6:44
valikac26-Dec-02 6:44 
Generaldistributing mfc app Pin
r i s h a b h s25-Dec-02 18:38
r i s h a b h s25-Dec-02 18:38 
GeneralRe: distributing mfc app Pin
Christian Graus25-Dec-02 19:13
protectorChristian Graus25-Dec-02 19:13 
GeneralRe: distributing mfc app Pin
Pavel Klocek25-Dec-02 22:42
Pavel Klocek25-Dec-02 22:42 
Generalproblem with a global mouse hook Pin
king_of_the_world25-Dec-02 18:36
king_of_the_world25-Dec-02 18:36 
GeneralFocusing window Pin
suresh_sathya25-Dec-02 18:20
suresh_sathya25-Dec-02 18:20 
GeneralFocusing window Pin
Anonymous25-Dec-02 18:10
Anonymous25-Dec-02 18:10 
GeneralRe: Focusing window Pin
Roman Fadeyev25-Dec-02 23:14
Roman Fadeyev25-Dec-02 23:14 
QuestionHow to send data from one application to another Pin
Exceter25-Dec-02 17:34
Exceter25-Dec-02 17:34 
AnswerRe: How to send data from one application to another Pin
chepuri_uk25-Dec-02 20:59
chepuri_uk25-Dec-02 20:59 
AnswerRe: How to send data from one application to another Pin
Pavel Klocek25-Dec-02 22:46
Pavel Klocek25-Dec-02 22:46 
GeneralTop-Level Menu Item Data Pin
comrade25-Dec-02 12:17
comrade25-Dec-02 12:17 
GeneralClient/Server advice Pin
Rickard Andersson2025-Dec-02 11:55
Rickard Andersson2025-Dec-02 11:55 
GeneralRe: Client/Server advice Pin
Todd C. Wilson25-Dec-02 17:38
Todd C. Wilson25-Dec-02 17:38 
GeneralRe: Client/Server advice Pin
Rickard Andersson2025-Dec-02 23:31
Rickard Andersson2025-Dec-02 23:31 
GeneralRe: Client/Server advice Pin
Moak25-Dec-02 19:28
Moak25-Dec-02 19:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.