Click here to Skip to main content
16,005,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRE: VBScript compilation problem Pin
Anonymous8-Aug-02 19:39
Anonymous8-Aug-02 19:39 
GeneralRe: RE: VBScript compilation problem Pin
Jon Hulatt9-Aug-02 1:17
Jon Hulatt9-Aug-02 1:17 
GeneralCDialogBar Initialization Pin
JennyP8-Aug-02 19:09
JennyP8-Aug-02 19:09 
GeneralRe: CDialogBar Initialization Pin
Shog98-Aug-02 19:40
sitebuilderShog98-Aug-02 19:40 
GeneralPopup menu Pin
Vijayalakshmi8-Aug-02 18:49
Vijayalakshmi8-Aug-02 18:49 
GeneralRe: Popup menu Pin
Steen Krogsgaard9-Aug-02 0:23
Steen Krogsgaard9-Aug-02 0:23 
Generalrecv() function Pin
zecodela8-Aug-02 17:25
zecodela8-Aug-02 17:25 
GeneralRe: recv() function Pin
Nish Nishant8-Aug-02 17:34
sitebuilderNish Nishant8-Aug-02 17:34 
recv() function returns when it has received some data. We cannot predict how many bytes it returns. This depends on your network and the buffer and various other factors.

For example if the sender has sent a string "hello world", this might come in any of the following ways or even other ways.

1 single packet - "hello world" - recv() returns 11

2 packets - "he" and "llo world" - recv() returns 2 and 9

3 packets - "he", "llo w" and "orld" - recv() returns 2, 5 and 4

3 packets - "hello", " w" and "orld" - recv() returns 5, 2 and 4

What I am trying to put through is that you need to loop your recv() call till you are sure all the data has come, probably by using some kind of termination code. SMTP uses \r\n.\r\n for example.

Regards,
Nish


Author of the romantic comedy

Summer Love and Some more Cricket [New Win]

Review by Shog9
Click here for review[NW]

GeneralRe: recv() function Pin
zecodela8-Aug-02 20:17
zecodela8-Aug-02 20:17 
GeneralRe: recv() function Pin
Brian Azzopardi8-Aug-02 22:19
Brian Azzopardi8-Aug-02 22:19 
GeneralRe: recv() function Pin
D Satya9-Aug-02 1:27
D Satya9-Aug-02 1:27 
QuestionFile join problem? Pin
chen8-Aug-02 16:31
chen8-Aug-02 16:31 
AnswerRe: File join problem? Pin
Nish Nishant8-Aug-02 17:28
sitebuilderNish Nishant8-Aug-02 17:28 
AnswerRe: File join problem? Pin
Jason Henderson8-Aug-02 17:45
Jason Henderson8-Aug-02 17:45 
GeneralRe: Dll Registration Pin
abhinarulkar8-Aug-02 23:05
abhinarulkar8-Aug-02 23:05 
GeneralThread Synchronization :: Win32 API vs. MFC Pin
valikac8-Aug-02 15:47
valikac8-Aug-02 15:47 
GeneralRe: Thread Synchronization :: Win32 API vs. MFC Pin
Nish Nishant8-Aug-02 17:24
sitebuilderNish Nishant8-Aug-02 17:24 
GeneralRe: Thread Synchronization :: Win32 API vs. MFC Pin
valikac8-Aug-02 17:27
valikac8-Aug-02 17:27 
GeneralChecksum Pin
Ed Gadziemski8-Aug-02 13:04
professionalEd Gadziemski8-Aug-02 13:04 
GeneralSending and Receiving Files Pin
fdmanana8-Aug-02 12:46
fdmanana8-Aug-02 12:46 
GeneralRe: Humm... Pin
Masaaki Onishi8-Aug-02 19:28
Masaaki Onishi8-Aug-02 19:28 
GeneralCreateFile & WriteFile Pin
Mavrock8-Aug-02 12:14
Mavrock8-Aug-02 12:14 
GeneralCPropertySheet - initialization Pin
john john mackey8-Aug-02 12:06
john john mackey8-Aug-02 12:06 
GeneralRe: CPropertySheet - initialization Pin
john john mackey8-Aug-02 12:27
john john mackey8-Aug-02 12:27 
QuestionBuggy Debug? Pin
dazinith8-Aug-02 11:36
dazinith8-Aug-02 11:36 

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.