Click here to Skip to main content
15,917,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to highlight a Check box if no caption Pin
Blake Miller7-Nov-06 3:48
Blake Miller7-Nov-06 3:48 
QuestionInserting Data in database by Atl consumer wizard [modified] Pin
With_problem6-Nov-06 16:26
With_problem6-Nov-06 16:26 
Questionwrap/hide string references Pin
Benlahrech .Dj6-Nov-06 13:39
Benlahrech .Dj6-Nov-06 13:39 
AnswerRe: wrap/hide string references Pin
Jörgen Sigvardsson6-Nov-06 14:32
Jörgen Sigvardsson6-Nov-06 14:32 
AnswerRe: wrap/hide string references Pin
Michael Dunn6-Nov-06 16:07
sitebuilderMichael Dunn6-Nov-06 16:07 
AnswerRe: wrap/hide string references Pin
Benlahrech .Dj7-Nov-06 11:31
Benlahrech .Dj7-Nov-06 11:31 
QuestionCAsyncSocket - Client receives some messages but not others Pin
realius2226-Nov-06 11:24
realius2226-Nov-06 11:24 
AnswerRe: CAsyncSocket - Client receives some messages but not others Pin
Mark Salsbery6-Nov-06 12:33
Mark Salsbery6-Nov-06 12:33 
realius222 wrote:
Also, the server is not receiving an OnSend message. It is my understanding from another post that the server should receive an OnSend message after sending to indicate it is ready for another send.


You'll need to call AsyncSelect(FD_WRITE) on the socket for OnSend() to be called by the
framework. You would do this on the socket accepted with Accept(). You may want to use other
flags as well but you at least need FD_WRITE to get OnSend() notification.

realius222 wrote:
All is well except the client does not always get the data that is sent by the server.


With TCP, you need to repeatedly call Receive() (or recv()) on the socket until you get the
number of bytes you are expecting. There's no guarantee that a successful call to Receive() will
return more than one byte. Of course, it usually does. Smile | :)
For example, if, in your OnReceive() handler, you call Receive() to receive 100 bytes and
Receive() returns 50, then you can return from OnReceive() and call Receive() again in the next
OnReceive() call for the remaining 50 bytes. Therefore, you'll need to keep track of how much
you've received and/or how much you are still waiting to receive until you've received what you're
expecting.

Hope that made sense Smile | :)
Mark
AnswerRe: CAsyncSocket - Client receives some messages but not others Pin
iserik6-Nov-06 18:06
iserik6-Nov-06 18:06 
QuestionActiveX Controls [modified] Pin
Stober6-Nov-06 11:21
Stober6-Nov-06 11:21 
QuestionMAPILogon with Groupwise Pin
yyf6-Nov-06 10:54
yyf6-Nov-06 10:54 
GeneralRe: MAPILogon with Groupwise Pin
yyf7-Nov-06 2:21
yyf7-Nov-06 2:21 
QuestionUse exisiting printing methods for Printers in Print Preview Pin
skywalkerking6-Nov-06 10:06
skywalkerking6-Nov-06 10:06 
AnswerRe: Use exisiting printing methods for Printers in Print Preview" Pin
skywalkerking6-Nov-06 10:26
skywalkerking6-Nov-06 10:26 
QuestionLinking DLL's Pin
joeller6-Nov-06 8:57
professionaljoeller6-Nov-06 8:57 
AnswerRe: Linking DLL's Pin
Mark Salsbery6-Nov-06 12:45
Mark Salsbery6-Nov-06 12:45 
GeneralRe: Linking DLL's Pin
joeller7-Nov-06 3:42
professionaljoeller7-Nov-06 3:42 
GeneralRe: Linking DLL's Pin
Mark Salsbery7-Nov-06 5:27
Mark Salsbery7-Nov-06 5:27 
GeneralRe: Linking DLL's Pin
joeller7-Nov-06 8:08
professionaljoeller7-Nov-06 8:08 
GeneralRe: Linking DLL's Pin
Mark Salsbery7-Nov-06 8:17
Mark Salsbery7-Nov-06 8:17 
AnswerRe: Linking DLL's Pin
Michael Dunn6-Nov-06 16:14
sitebuilderMichael Dunn6-Nov-06 16:14 
GeneralRe: Linking DLL's Pin
joeller7-Nov-06 4:21
professionaljoeller7-Nov-06 4:21 
GeneralRe: Linking DLL's Pin
Mark Salsbery7-Nov-06 6:47
Mark Salsbery7-Nov-06 6:47 
GeneralRe: Linking DLL's Pin
joeller7-Nov-06 9:11
professionaljoeller7-Nov-06 9:11 
GeneralRe: Linking DLL's Pin
Mark Salsbery7-Nov-06 9:33
Mark Salsbery7-Nov-06 9:33 

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.