Click here to Skip to main content
15,116,516 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Answerunexpected behavior Pin
bkelly1316-Sep-12 11:07
Memberbkelly1316-Sep-12 11:07 
AnswerRe: CAsyncSocket Connect says in use Pin
Richard Andrew x6416-Sep-12 12:53
professionalRichard Andrew x6416-Sep-12 12:53 
AnswerRe: CAsyncSocket Connect says in use Pin
pasztorpisti16-Sep-12 13:05
Memberpasztorpisti16-Sep-12 13:05 
GeneralRe: CAsyncSocket Connect says in use Pin
bkelly1316-Sep-12 13:55
Memberbkelly1316-Sep-12 13:55 
GeneralRe: CAsyncSocket Connect says in use Pin
pasztorpisti16-Sep-12 14:09
Memberpasztorpisti16-Sep-12 14:09 
GeneralRe: CAsyncSocket Connect says in use Pin
bkelly1316-Sep-12 14:17
Memberbkelly1316-Sep-12 14:17 
GeneralRe: CAsyncSocket Connect says in use Pin
pasztorpisti16-Sep-12 14:34
Memberpasztorpisti16-Sep-12 14:34 
GeneralRe: CAsyncSocket Connect says in use Pin
bkelly1316-Sep-12 15:07
Memberbkelly1316-Sep-12 15:07 
Well then, I think I was doing things out of order. My dialog has all the pieces broken out so I performed the following steps:

Server::Initialize, wsa = 0
Client::Initialize, wsa = 0
Server::Listen, wsa = 0
Client::Connect wsa = 10035
Client::OnConnect() is called
Server::OnAccept() is called
Client::OnSend() is called

As noted earlier, I have all those methods defined but with no body and a breakpoint in each. Is this normal behavior? If so,...
Does Client::OnConnect() need to do anything?
Same for Server::OnAccept and Client::OnSend?

I am getting close. Next Step?

Thanks for your time

Edit again: I have this code in the function C_Server::Class_Accept() that is called via a button in the dialog.

C++
bool C_Server::Class_Accept()
{
   mp_C_Server_Send_Time_Socket = new C_Server_Send_Time_Socket;
   m_winsock_status = Accept( *mp_C_Server_Send_Time_Socket );
}


Now I that I see C_Server::OnAccept() called, that code should be moved into the OnAccept method and executed automatically after the client connects. Then I would NOT have a manually called Accept() method in the server class.

Does that sound right?

modified 16-Sep-12 20:16pm.

Questionbetter version of strcpy() and printf() Pin
bkelly1315-Sep-12 11:02
Memberbkelly1315-Sep-12 11:02 
AnswerRe: better version of strcpy() and printf() Pin
Paul M Watt15-Sep-12 13:33
mentorPaul M Watt15-Sep-12 13:33 
GeneralRe: better version of strcpy() and printf() Pin
bkelly1315-Sep-12 16:34
Memberbkelly1315-Sep-12 16:34 
GeneralRe: better version of strcpy() and printf() Pin
Paul M Watt15-Sep-12 16:45
mentorPaul M Watt15-Sep-12 16:45 
GeneralRe: better version of strcpy() and printf() Pin
bkelly1315-Sep-12 17:23
Memberbkelly1315-Sep-12 17:23 
GeneralRe: better version of strcpy() and printf() Pin
pasztorpisti16-Sep-12 7:54
Memberpasztorpisti16-Sep-12 7:54 
GeneralRe: better version of strcpy() and printf() Pin
Richard MacCutchan16-Sep-12 1:10
mveRichard MacCutchan16-Sep-12 1:10 
AnswerRe: better version of strcpy() and printf() Pin
Richard Andrew x6415-Sep-12 18:01
professionalRichard Andrew x6415-Sep-12 18:01 
AnswerRe: better version of strcpy() and printf() Pin
Richard MacCutchan16-Sep-12 1:09
mveRichard MacCutchan16-Sep-12 1:09 
AnswerRe: better version of strcpy() and printf() Pin
pasztorpisti16-Sep-12 2:37
Memberpasztorpisti16-Sep-12 2:37 
AnswerRe: better version of strcpy() and printf() Pin
Stephen Hewitt18-Sep-12 1:29
MemberStephen Hewitt18-Sep-12 1:29 
Questionget a number into static text control Pin
bkelly1313-Sep-12 18:05
Memberbkelly1313-Sep-12 18:05 
AnswerRe: get a number into static text control Pin
Richard MacCutchan13-Sep-12 22:52
mveRichard MacCutchan13-Sep-12 22:52 
GeneralRe: get a number into static text control Pin
bkelly1314-Sep-12 16:00
Memberbkelly1314-Sep-12 16:00 
GeneralRe: get a number into static text control Pin
Paul M Watt14-Sep-12 16:36
mentorPaul M Watt14-Sep-12 16:36 
GeneralRe: get a number into static text control Pin
Richard MacCutchan15-Sep-12 0:02
mveRichard MacCutchan15-Sep-12 0:02 
GeneralRe: get a number into static text control Pin
bkelly1315-Sep-12 6:14
Memberbkelly1315-Sep-12 6:14 

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.