Click here to Skip to main content
15,894,262 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Memory increases while inserting items in list Pin
Stefan_Lang15-Jun-11 23:02
Stefan_Lang15-Jun-11 23:02 
GeneralRe: Memory increases while inserting items in list Pin
JV999915-Jun-11 23:15
professionalJV999915-Jun-11 23:15 
AnswerRe: Memory increases while inserting items in list [modified] Pin
Stefan_Lang15-Jun-11 22:29
Stefan_Lang15-Jun-11 22:29 
AnswerRe: Memory increases while inserting items in list Pin
Maximilien15-Jun-11 23:59
Maximilien15-Jun-11 23:59 
AnswerRe: Memory increases while inserting items in list Pin
Chris Losinger16-Jun-11 3:41
professionalChris Losinger16-Jun-11 3:41 
JokeRe: Memory increases while inserting items in list Pin
Richard MacCutchan16-Jun-11 4:54
mveRichard MacCutchan16-Jun-11 4:54 
GeneralRe: Memory increases while inserting items in list Pin
Niklas L16-Jun-11 8:06
Niklas L16-Jun-11 8:06 
GeneralRe: Memory increases while inserting items in list Pin
Rhuros16-Jun-11 22:04
professionalRhuros16-Jun-11 22:04 
QuestionRe: Memory increases while inserting items in list Pin
David Crow16-Jun-11 8:00
David Crow16-Jun-11 8:00 
Question[Win32]Set bitmap to button Pin
Member 296547115-Jun-11 8:14
Member 296547115-Jun-11 8:14 
AnswerRe: [Win32]Set bitmap to button Pin
Chris Losinger15-Jun-11 8:23
professionalChris Losinger15-Jun-11 8:23 
GeneralRe: [Win32]Set bitmap to button Pin
Member 296547115-Jun-11 8:28
Member 296547115-Jun-11 8:28 
GeneralRe: [Win32]Set bitmap to button Pin
Chris Losinger15-Jun-11 8:33
professionalChris Losinger15-Jun-11 8:33 
GeneralRe: [Win32]Set bitmap to button Pin
Member 296547115-Jun-11 9:01
Member 296547115-Jun-11 9:01 
GeneralRe: [Win32]Set bitmap to button Pin
Richard MacCutchan15-Jun-11 21:15
mveRichard MacCutchan15-Jun-11 21:15 
GeneralRe: [Win32]Set bitmap to button Pin
Member 296547115-Jun-11 22:34
Member 296547115-Jun-11 22:34 
GeneralRe: [Win32]Set bitmap to button [modified] Pin
Richard MacCutchan16-Jun-11 3:22
mveRichard MacCutchan16-Jun-11 3:22 
AnswerRe: [Win32]Set bitmap to button Pin
Abhi Lahare15-Jun-11 8:32
Abhi Lahare15-Jun-11 8:32 
GeneralRe: [Win32]Set bitmap to button Pin
Member 296547115-Jun-11 8:35
Member 296547115-Jun-11 8:35 
QuestionCAsyncSocket - Connection Recovery Pin
burns86315-Jun-11 6:31
burns86315-Jun-11 6:31 
Hi,

I've been working with some code that uses a TCP connection for the past few weeks. I have a socket class derived from CAsyncSocket.

Everything works fine initially. I instantiate my manager class which wraps around the socket class and calls connect (via a member pointer to the socket class). I am then able to send a receive data. The problem comes when there is a socket error. For a currently unknown reason, part of my code is causing a socket error. I have yet to find where this is happening but the problem forced me to test out the part of my code which shoudl attempt to recover the connection. It doesn't work, and I can't get things going.

I have overriden OnClose, which calls a method on the manager class (its parent) called OnSocketClose. This calls socket.shutdown(), socket.close() and 'delete socket'. It then sets the pointer to 0. From here, the next time I attempt to send anything down the socket it looks for the socket pointer == 0, to indicate that it should create a pointer to a new socket.

This new socket is created but fails to connect. I have got it to appear connected on a couple of occasions by moving things around but OnConnect doesn't seem to get called and I am unable to send data. The returned value from socket.connect however reports that the socket is already connected if I call socket.connect again, after a short period of time from the first call to connect (socket error 10056).

Apologies if this sounds a little confusing, but I think I have managed to confuse myself... massively Confused | :confused:

If it will help, I can post code? Just let me know which parts you need to see.

Thanks!
AnswerRe: CAsyncSocket - Connection Recovery Pin
burns86316-Jun-11 3:18
burns86316-Jun-11 3:18 
QuestionRouting Enter/Return key press to a Dialog Pin
dipuks15-Jun-11 4:33
dipuks15-Jun-11 4:33 
AnswerRe: Routing Enter/Return key press to a Dialog Pin
Abhi Lahare15-Jun-11 4:51
Abhi Lahare15-Jun-11 4:51 
GeneralRe: Routing Enter/Return key press to a Dialog Pin
dipuks15-Jun-11 5:31
dipuks15-Jun-11 5:31 
GeneralRe: Routing Enter/Return key press to a Dialog Pin
Abhi Lahare15-Jun-11 7:01
Abhi Lahare15-Jun-11 7:01 

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.