🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.networks
Article #28

Winsock

#28
From: lucas montes
Date: Fri, 06 Apr 2001 15:12
20 lines
2554 bytes
Hello, I' ve got a pb with CAsyncSocket; I call AsyncSelect(FD_CONNECT) and
then Connect(...). I always have a WSAEWOULDBLOCK  error but OnConnect(..)
is never called!!!
If I set a timer and recall Connect, I've got no error but I've got a
strange thing: I derived the class CAsyncSocket; I've got a member CString*
CMyAsyncSocket::m_SendBuffer; In the constructor, I have:
m_SendBuffer = new CString( str );  when I call Connect for The first time
and get a WSAEWOULDBLOCK error, *m_SendBuffer is equal to str, but just
after SetTimer is called, when Connect is called for the second time,
*m_SendBuffer is equal to " "; I can't figure out why the call of SetTimer
can delete the string in m_SendBuffer!!! (m_SendBuffer is not NULL but the
string is)
The second call of Connect (when the timer is called), is always successfull
but the first one always failed.

if someone can see my mistake, it would help me a lot!

--
Regards,
      Lucas.
Technical Details
Message-ID: <9akltp$oea$1@front3.grolier.fr>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!grolier!club-internet!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1138df,672b2951a64872f7,start
X-Google-Attributes: gid1138df,public
X-Google-Thread: 11664b,672b2951a64872f7,start
X-Google-Attributes: gid11664b,public
X-Google-Thread: 113dfb,672b2951a64872f7,start
X-Google-Attributes: gid113dfb,public
X-Google-Thread: fa91f,672b2951a64872f7,start
X-Google-Attributes: gidfa91f,public
X-Google-Thread: 102e15,672b2951a64872f7,start
X-Google-Attributes: gid102e15,public
X-Google-Thread: 112bf7,672b2951a64872f7,start
X-Google-Attributes: gid112bf7,public
X-Google-Thread: f96de,672b2951a64872f7,start
X-Google-Attributes: gidf96de,public
X-Google-ArrivalTime: 2001-04-06 08:06:09 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!grolier!club-internet!not-for-mail
From: "lucas montes" <lucas_montes@club-internet.fr>
Newsgroups: comp.os.ms-windows.programmer.networks,comp.os.ms-windows.programmer.tools.mfc,comp.os.ms-windows.programmer.tools.winsock,comp.os.ms-windows.programmer.win32,comp.os.ms-windows.programmer.winhelp,fr.comp.developpement,fr.comp.os.ms-windows.programm
Subject: Winsock
Date: Fri, 6 Apr 2001 17:12:16 +0200
Organization: Club-Internet (France)
Lines: 26
Message-ID: <9akltp$oea$1@front3.grolier.fr>
NNTP-Posting-Host: bas1-66.idf8-1.club-internet.fr
X-Trace: front3.grolier.fr 986569465 25034 195.36.231.66 (6 Apr 2001 15:04:25 GMT)
NNTP-Posting-Date: 6 Apr 2001 15:04:25 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200