Click here to Skip to main content
15,890,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionpush_back ina vector - Not working for me Pin
LCI6-Mar-07 7:00
LCI6-Mar-07 7:00 
AnswerRe: push_back ina vector - Not working for me Pin
Maximilien6-Mar-07 7:30
Maximilien6-Mar-07 7:30 
GeneralRe: push_back ina vector - Not working for me Pin
LCI6-Mar-07 7:35
LCI6-Mar-07 7:35 
GeneralRe: push_back ina vector - Not working for me Pin
LCI6-Mar-07 7:46
LCI6-Mar-07 7:46 
GeneralRe: push_back ina vector - Not working for me Pin
CPallini6-Mar-07 9:53
mveCPallini6-Mar-07 9:53 
QuestionAsynchrounous sockets doubts Pin
Alex Cutovoi6-Mar-07 6:52
Alex Cutovoi6-Mar-07 6:52 
AnswerRe: Asynchrounous sockets doubts Pin
Mark Salsbery6-Mar-07 15:10
Mark Salsbery6-Mar-07 15:10 
GeneralRe: Asynchrounous sockets doubts Pin
Alex Cutovoi7-Mar-07 3:15
Alex Cutovoi7-Mar-07 3:15 
Thanks again Mark, I've suspected that WSAEWOULDBLOCK message indicates what you said. I comproved this studying some code samples and noticing the WSAEISCONN message. Just a question of pay attention. FYI, I'm developing my apps with Win32, not a single gout of MFC.
I'm very new in this subject, I'm developing my app based on your answer about my question of sockets: Socket curious error
Very thanks.
I have some questions yet:

Mark Salsbery wrote:
Since you've used WSAAsyncSelect() specifying the FD_READ and FD_WRITE flags you will be notified
when there is data available to be read from the socket and when the socket is ready to accept
send data. This notification will be in the form of a window message (WM_ASYNCMSG) so you could
send/recv data on the UI thread that processes this message. You can also send/recv on other
threads. Just make sure you use some form of synchronization - sockets ops are not thread safe.

So, do I need to put the SendData and RecieveData functions in a thread right? Can you give me a sample?
Mark Salsbery wrote:
Always check the return code on send() and recv() calls to make sure the number of bytes requested
were actually sent or received. A send() or recv() is successful even if only ONE byte gets sent
or received. You'll need to be ready to send remaining unsent bytes and/or receive remaining
unreceived bytes.

This is the hard part, how can I check in app there unsent bytes?

This is a topic that I don't domain yet, I'll be very grateful if you can answer my questions again.
GeneralRe: Asynchrounous sockets doubts Pin
Mark Salsbery7-Mar-07 4:25
Mark Salsbery7-Mar-07 4:25 
GeneralRe: Asynchrounous sockets doubts Pin
Alex Cutovoi7-Mar-07 5:06
Alex Cutovoi7-Mar-07 5:06 
GeneralRe: Asynchrounous sockets doubts Pin
Mark Salsbery7-Mar-07 5:22
Mark Salsbery7-Mar-07 5:22 
GeneralRe: Asynchrounous sockets doubts Pin
Alex Cutovoi7-Mar-07 6:16
Alex Cutovoi7-Mar-07 6:16 
QuestionCapture specific area on screen... Pin
priyank_ldce6-Mar-07 5:31
priyank_ldce6-Mar-07 5:31 
AnswerRe: Capture specific area on screen... Pin
Ravi Bhavnani6-Mar-07 5:34
professionalRavi Bhavnani6-Mar-07 5:34 
GeneralRe: Capture specific area on screen... Pin
priyank_ldce6-Mar-07 6:12
priyank_ldce6-Mar-07 6:12 
GeneralRe: Capture specific area on screen... Pin
Ravi Bhavnani6-Mar-07 6:16
professionalRavi Bhavnani6-Mar-07 6:16 
GeneralRe: Capture specific area on screen... Pin
Blake Miller6-Mar-07 6:44
Blake Miller6-Mar-07 6:44 
AnswerRe: Capture specific area on screen... Pin
Mark Salsbery6-Mar-07 15:13
Mark Salsbery6-Mar-07 15:13 
QuestionHow to show tool tip help for tool bar items? Pin
Aryan S6-Mar-07 5:14
Aryan S6-Mar-07 5:14 
AnswerRe: How to show tool tip help for tool bar items? Pin
led mike6-Mar-07 5:28
led mike6-Mar-07 5:28 
AnswerRe: How to show tool tip help for tool bar items? Pin
Ravi Bhavnani6-Mar-07 5:33
professionalRavi Bhavnani6-Mar-07 5:33 
QuestionReal Time Application - Server Socket Pin
ScotDolan6-Mar-07 4:45
ScotDolan6-Mar-07 4:45 
AnswerRe: Real Time Application - Server Socket Pin
led mike6-Mar-07 4:53
led mike6-Mar-07 4:53 
GeneralRe: Real Time Application - Server Socket Pin
Ravi Bhavnani6-Mar-07 5:36
professionalRavi Bhavnani6-Mar-07 5:36 
GeneralRe: Real Time Application - Server Socket Pin
led mike6-Mar-07 5:56
led mike6-Mar-07 5:56 

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.