Article View: borland.public.cppbuilder.internet.socket
Article #2266Re: Event driven receive
From: Remy Lebeau (TeamB)
Date: Wed, 12 Jul 2006 16:54
Date: Wed, 12 Jul 2006 16:54
25 lines
1781 bytes
1781 bytes
"SVC" <svchamlian@hotmail.com> wrote in message news:44b51e08@newsgroups.borland.com... > My socket is non-blocking Sockets are blocking by default. You have to explicitally put them into non-blocking mode in your code. You did not describe doing that step in the sequence of operations that you posted earlier. > Is it possible to use the WSAAsyncSelect() in a console application Yes, but you will need to implement a message queue in your code in order for it to work. Non-blocking sockets are message-based objects, regardless of whether you use a window or an event object to receive notifications of socket events. > my communication module is a thread running in the background I do not recommend using a non-blocking socket in a worker thread if you can avoid it. That will complicate the thread's design. Blocking sockets work better. Gambit
Technical Details
Message-ID:
<44b52937@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44b41065$1@newsgroups.borland.com> <44b424b9$1@newsgroups.borland.com> <44b51e08@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,51bf75bfa952f51 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <44b41065$1@newsgroups.borland.com> <44b424b9$1@newsgroups.borland.com> <44b51e08@newsgroups.borland.com> Subject: Re: Event driven receive Date: Wed, 12 Jul 2006 09:54:02 -0700 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <44b52937@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1152723255 68.69.17.41 (12 Jul 2006 09:54:15 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail