Click here to Skip to main content
15,881,757 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMissing packets Pin
dushkin7-Aug-11 8:55
dushkin7-Aug-11 8:55 
AnswerRe: Missing packets Pin
Ahmed Charfeddine8-Aug-11 0:13
Ahmed Charfeddine8-Aug-11 0:13 
GeneralRe: Missing packets Pin
Albert Holguin8-Aug-11 9:24
professionalAlbert Holguin8-Aug-11 9:24 
GeneralRe: Missing packets Pin
Tony Hill8-Aug-11 9:43
mveTony Hill8-Aug-11 9:43 
GeneralRe: Missing packets Pin
Albert Holguin8-Aug-11 10:21
professionalAlbert Holguin8-Aug-11 10:21 
GeneralRe: Missing packets Pin
Tony Hill8-Aug-11 10:44
mveTony Hill8-Aug-11 10:44 
GeneralRe: Missing packets Pin
Albert Holguin9-Aug-11 4:11
professionalAlbert Holguin9-Aug-11 4:11 
AnswerRe: Missing packets Pin
Chuck O'Toole8-Aug-11 10:32
Chuck O'Toole8-Aug-11 10:32 
I ran into something that looked like this when doing TCP Sockets from Windows to non-Windows (Linux, AIX, HPUX, and others).

There is no guarantee that there is a 1-1 correspondence between send() and recv() (or the OS equivalent). This is especially true if different buffer sizes are used or variable length messages are sent.

The OS is allowed to buffer up the data and send it at one time and the receiver can do a read and get multiple messages into the buffer, even partial messages to fill up the buffer, leaving the rest for the next receive.

Basically, you have to control the "message framing" to locate and separate the start of each incoming message.

Now this is generally not a problem for "command / response" protocols, that is, one program does the send and then does a receive to get the response. This way, each end of the socket is doing a synchronized handshake, one message going out, one message coming in. But if you have an application where you send lots of data first, or receive lots of output, then you might be looking at "lost data" because you are receiving the data from multiple "sends" with one "receive".

Anyway, by doing my own message framing and reassembly, I was able to avoid this possibility.
Questionhow use API HOOKing interception URLs and modify URLs Pin
67847467-Aug-11 5:14
67847467-Aug-11 5:14 
AnswerRe: how use API HOOKing interception URLs and modify URLs Pin
Richard MacCutchan7-Aug-11 21:36
mveRichard MacCutchan7-Aug-11 21:36 
AnswerRe: how use API HOOKing interception URLs and modify URLs Pin
Code-o-mat7-Aug-11 21:58
Code-o-mat7-Aug-11 21:58 
QuestionNeed source code of changing animated gif frames to Bitmap file Pin
includeh106-Aug-11 15:15
includeh106-Aug-11 15:15 
AnswerRe: Need source code of changing animated gif frames to Bitmap file Pin
Code-o-mat7-Aug-11 2:00
Code-o-mat7-Aug-11 2:00 
QuestionUnsigned Integer Arrays? Pin
Software20076-Aug-11 5:33
Software20076-Aug-11 5:33 
AnswerRe: Unsigned Integer Arrays? PinPopular
Chris Losinger6-Aug-11 5:55
professionalChris Losinger6-Aug-11 5:55 
GeneralRe: Unsigned Integer Arrays? Pin
Software20076-Aug-11 6:05
Software20076-Aug-11 6:05 
GeneralRe: Unsigned Integer Arrays? Pin
Rick York7-Aug-11 7:37
mveRick York7-Aug-11 7:37 
QuestionResource Issue after Convert C++ program from VS 2003 to VS2008 Pin
Andraw Tang5-Aug-11 7:00
Andraw Tang5-Aug-11 7:00 
AnswerRe: Resource Issue after Convert C++ program from VS 2003 to VS2008 Pin
Albert Holguin5-Aug-11 7:29
professionalAlbert Holguin5-Aug-11 7:29 
GeneralRe: Resource Issue after Convert C++ program from VS 2003 to VS2008 Pin
Andraw Tang5-Aug-11 7:45
Andraw Tang5-Aug-11 7:45 
SuggestionRe: Resource Issue after Convert C++ program from VS 2003 to VS2008 Pin
Albert Holguin5-Aug-11 8:36
professionalAlbert Holguin5-Aug-11 8:36 
GeneralRe: Resource Issue after Convert C++ program from VS 2003 to VS2008 Pin
Albert Holguin5-Aug-11 8:37
professionalAlbert Holguin5-Aug-11 8:37 
AnswerRe: Resource Issue after Convert C++ program from VS 2003 to VS2008 Pin
Andraw Tang5-Aug-11 11:08
Andraw Tang5-Aug-11 11:08 
GeneralRe: Resource Issue after Convert C++ program from VS 2003 to VS2008 Pin
Albert Holguin6-Aug-11 13:36
professionalAlbert Holguin6-Aug-11 13:36 
QuestionWhat's the workspace coordinates in WINDOWS ? Pin
Cold_Fearing_Bird5-Aug-11 4:09
Cold_Fearing_Bird5-Aug-11 4:09 

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.