Click here to Skip to main content
15,891,248 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: get instance of object (in exe) from dll caller Pin
pasztorpisti17-Sep-12 13:48
pasztorpisti17-Sep-12 13:48 
AnswerRe: get instance of object (in exe) from dll caller Pin
Richard MacCutchan17-Sep-12 22:16
mveRichard MacCutchan17-Sep-12 22:16 
AnswerRe: get instance of object (in exe) from dll caller Pin
Stephen Hewitt18-Sep-12 18:49
Stephen Hewitt18-Sep-12 18:49 
QuestionCAsyncSocket Connect says in use Pin
bkelly1316-Sep-12 6:07
bkelly1316-Sep-12 6:07 
Answerunexpected behavior Pin
bkelly1316-Sep-12 10:07
bkelly1316-Sep-12 10:07 
AnswerRe: CAsyncSocket Connect says in use Pin
Richard Andrew x6416-Sep-12 11:53
professionalRichard Andrew x6416-Sep-12 11:53 
AnswerRe: CAsyncSocket Connect says in use Pin
pasztorpisti16-Sep-12 12:05
pasztorpisti16-Sep-12 12:05 
GeneralRe: CAsyncSocket Connect says in use Pin
bkelly1316-Sep-12 12:55
bkelly1316-Sep-12 12:55 
Oops. It is the Accept() that returns the would block WSA code, not Listen. My appologies.
Here are some code fragments:

Omitting the error checking and reporting, the server initialize does this

C++
bool C_Server::Class_Initialize()
{ ...
  m_winsock_status = AfxSocketInit();
...
  m_winsock_status = Create( m_port_number,  // value is 49000
                             SOCK_STREAM,
                             FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE,
                             DEFAULT_IP_ADDRESS );  // value is 127.0.0.1
...}


the Listen() method does this:

C++
bool C_Server::Class_Listen()
{
   m_winsock_status = Listen();
... }


And the Accept() looks like this:

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 );
...}


I have continued work and am partway through the Client code. The client initialize seems to be OK, the client Connect() gets WSA code 10035, socket in use. I am beginning to think that is to be expected.

Advice?

Thanks for your time
Edit, I keep messing with the formatting trying to get the code blocks to display correctly. Having some difficulties there. Preview looks good, but when I post it does not. I think I have it, disabled the checkbox to treat my content as plain text. But this darn edit box keeps jumping around in the text.
GeneralRe: CAsyncSocket Connect says in use Pin
pasztorpisti16-Sep-12 13:09
pasztorpisti16-Sep-12 13:09 
GeneralRe: CAsyncSocket Connect says in use Pin
bkelly1316-Sep-12 13:17
bkelly1316-Sep-12 13:17 
GeneralRe: CAsyncSocket Connect says in use Pin
pasztorpisti16-Sep-12 13:34
pasztorpisti16-Sep-12 13:34 
GeneralRe: CAsyncSocket Connect says in use Pin
bkelly1316-Sep-12 14:07
bkelly1316-Sep-12 14:07 
Questionbetter version of strcpy() and printf() Pin
bkelly1315-Sep-12 10:02
bkelly1315-Sep-12 10:02 
AnswerRe: better version of strcpy() and printf() Pin
Paul M Watt15-Sep-12 12:33
mentorPaul M Watt15-Sep-12 12:33 
GeneralRe: better version of strcpy() and printf() Pin
bkelly1315-Sep-12 15:34
bkelly1315-Sep-12 15:34 
GeneralRe: better version of strcpy() and printf() Pin
Paul M Watt15-Sep-12 15:45
mentorPaul M Watt15-Sep-12 15:45 
GeneralRe: better version of strcpy() and printf() Pin
bkelly1315-Sep-12 16:23
bkelly1315-Sep-12 16:23 
GeneralRe: better version of strcpy() and printf() Pin
pasztorpisti16-Sep-12 6:54
pasztorpisti16-Sep-12 6:54 
GeneralRe: better version of strcpy() and printf() Pin
Richard MacCutchan16-Sep-12 0:10
mveRichard MacCutchan16-Sep-12 0:10 
AnswerRe: better version of strcpy() and printf() Pin
Richard Andrew x6415-Sep-12 17:01
professionalRichard Andrew x6415-Sep-12 17:01 
AnswerRe: better version of strcpy() and printf() Pin
Richard MacCutchan16-Sep-12 0:09
mveRichard MacCutchan16-Sep-12 0:09 
AnswerRe: better version of strcpy() and printf() Pin
pasztorpisti16-Sep-12 1:37
pasztorpisti16-Sep-12 1:37 
AnswerRe: better version of strcpy() and printf() Pin
Stephen Hewitt18-Sep-12 0:29
Stephen Hewitt18-Sep-12 0:29 
Questionget a number into static text control Pin
bkelly1313-Sep-12 17:05
bkelly1313-Sep-12 17:05 
AnswerRe: get a number into static text control Pin
Richard MacCutchan13-Sep-12 21:52
mveRichard MacCutchan13-Sep-12 21:52 

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.