Click here to Skip to main content

ATL / WTL / STL

 
GeneralRe: CAsyncSocket Send( arguments ) PinmvpRichard MacCutchan30-Sep-12 5:13 
GeneralRe: CAsyncSocket Send( arguments ) Pinmemberbkelly1330-Sep-12 6:44 
GeneralRe: CAsyncSocket Send( arguments ) PinmvpRichard MacCutchan30-Sep-12 7:10 
GeneralRe: CAsyncSocket Send( arguments ) Pinmemberpasztorpisti30-Sep-12 7:38 
GeneralRe: CAsyncSocket Send( arguments ) [modified] Pinmemberbkelly1330-Sep-12 7:16 
GeneralRe: CAsyncSocket Send( arguments ) [modified] Pinmemberpasztorpisti30-Sep-12 7:31 
Questionget instance of object (in exe) from dll caller Pinmemberkhaliloenit17-Sep-12 5:38 
AnswerRe: get instance of object (in exe) from dll caller Pinmemberpasztorpisti17-Sep-12 7:57 
GeneralRe: get instance of object (in exe) from dll caller Pinmemberkhaliloenit17-Sep-12 10:32 
JokeRe: get instance of object (in exe) from dll caller Pinmemberpasztorpisti17-Sep-12 14:43 
GeneralRe: get instance of object (in exe) from dll caller Pinmemberpasztorpisti17-Sep-12 14:48 
AnswerRe: get instance of object (in exe) from dll caller PinmvpRichard MacCutchan17-Sep-12 23:16 
AnswerRe: get instance of object (in exe) from dll caller PinmemberStephen Hewitt18-Sep-12 19:49 
QuestionCAsyncSocket Connect says in use Pinmemberbkelly1316-Sep-12 7:07 
Environment Windows 7, Visual Studio 2008, MFC, C++
 
Goal:   create an asynchronous server and client class to demonstrate a simple server client operation. Base class for Server and Client is CAsyncSocket.   IP address 127.0.0.1, port 49000
 
Status:   The dialog has buttons for the server to Initialize, Listen, and Accept, so far.   It also has buttons for the client to Initialize and Connect.   Both have Close buttons.   One dialog but two separate classes.   Umm, make that three counting the CAsyncSocket class used by the server to communicate after the two have connected.
 
In the server group buttons Initialize and Accept appear to work correctly, in that order of course.   The returned status is TRUE and wsa error code is zero.   The Listen button creates a new object to handle the transactions and gets WSA code 10035 WSAEWOULDBLOKC, would block, treated as an expected result.   Good so far.   Now, hopefully, the server object is waiting for the client.
 
Then the buttons for the client are selected to Initialize, wsa error = 0, then Connect to the same IP address and port.   It gets wsa error code 10048,   WSAEADDRINUSE, address already in use.   Hmmm.   Yeah, it is in use, but if it is not in use by a server then the client cannot connect.  
 
I believe I have the code working as I expect, but there is a fundamental error in my logic.   Is this sufficient info for someone to tell me what I have done wrong or omitted?   What might that error be?
 
Thanks for your time
Answerunexpected behavior [modified] Pinmemberbkelly1316-Sep-12 11:07 
AnswerRe: CAsyncSocket Connect says in use PinmemberRichard Andrew x6416-Sep-12 12:53 
AnswerRe: CAsyncSocket Connect says in use Pinmemberpasztorpisti16-Sep-12 13:05 
GeneralRe: CAsyncSocket Connect says in use Pinmemberbkelly1316-Sep-12 13:55 
GeneralRe: CAsyncSocket Connect says in use Pinmemberpasztorpisti16-Sep-12 14:09 
GeneralRe: CAsyncSocket Connect says in use Pinmemberbkelly1316-Sep-12 14:17 
GeneralRe: CAsyncSocket Connect says in use Pinmemberpasztorpisti16-Sep-12 14:34 
GeneralRe: CAsyncSocket Connect says in use [modified] Pinmemberbkelly1316-Sep-12 15:07 
Questionbetter version of strcpy() and printf() Pinmemberbkelly1315-Sep-12 11:02 
AnswerRe: better version of strcpy() and printf() PinmentorPaul Watt15-Sep-12 13:33 
GeneralRe: better version of strcpy() and printf() Pinmemberbkelly1315-Sep-12 16:34 
GeneralRe: better version of strcpy() and printf() PinmentorPaul Watt15-Sep-12 16:45 
GeneralRe: better version of strcpy() and printf() Pinmemberbkelly1315-Sep-12 17:23 
GeneralRe: better version of strcpy() and printf() Pinmemberpasztorpisti16-Sep-12 7:54 
GeneralRe: better version of strcpy() and printf() PinmvpRichard MacCutchan16-Sep-12 1:10 
AnswerRe: better version of strcpy() and printf() PinmemberRichard Andrew x6415-Sep-12 18:01 
AnswerRe: better version of strcpy() and printf() PinmvpRichard MacCutchan16-Sep-12 1:09 
AnswerRe: better version of strcpy() and printf() Pinmemberpasztorpisti16-Sep-12 2:37 
AnswerRe: better version of strcpy() and printf() PinmemberStephen Hewitt18-Sep-12 1:29 
Questionget a number into static text control Pinmemberbkelly1313-Sep-12 18:05 
AnswerRe: get a number into static text control PinmvpRichard MacCutchan13-Sep-12 22:52 
GeneralRe: get a number into static text control Pinmemberbkelly1314-Sep-12 16:00 
GeneralRe: get a number into static text control PinmentorPaul Watt14-Sep-12 16:36 
GeneralRe: get a number into static text control PinmvpRichard MacCutchan15-Sep-12 0:02 
GeneralRe: get a number into static text control Pinmemberbkelly1315-Sep-12 6:14 
GeneralRe: get a number into static text control PinmvpRichard MacCutchan15-Sep-12 6:42 
QuestionMirroring system imagelist Pinmemberhuzifa3011-Sep-12 16:27 
QuestionCAsyncSocket, first application [modified] Pinmemberbkelly139-Sep-12 6:26 
AnswerRe: CAsyncSocket, first application PinmentorPaul Watt14-Sep-12 16:47 
QuestionAfxGetThread vs GetCurrentThreadID Pinmemberkishorekumarnaik6-Sep-12 7:52 
AnswerRe: AfxGetThread vs GetCurrentThreadID PinmemberJiří Miklík7-Sep-12 1:24 
Questionerror C2039: 'abort' : is not a member of 'std' PinmemberKASR13-Sep-12 0:35 
AnswerRe: error C2039: 'abort' : is not a member of 'std' PinmvpRichard MacCutchan3-Sep-12 1:50 
GeneralRe: error C2039: 'abort' : is not a member of 'std' PinmemberKASR13-Sep-12 2:44 
GeneralRe: error C2039: 'abort' : is not a member of 'std' PinmvpRichard MacCutchan3-Sep-12 3:21 
AnswerRe: error C2039: 'abort' : is not a member of 'std' PinmemberStephen Hewitt3-Sep-12 17:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 25 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid