Article View: borland.public.cppbuilder.internet.socket
Article #1588ASync Lookup for ServerSocket in non-blocking ?
From: Quentin David Jones
Date: Thu, 07 Dec 2006 05:46
Date: Thu, 07 Dec 2006 05:46
43 lines
2380 bytes
2380 bytes
Greetings all,
Well, I have found the Internet Chat example from Borland quite helpful. I
split it into a separate server and client and made the server simply
receive a file name from the client and return it's date/time, (and removed
all UI from the server.) Works fine.
Now,
I am trying to convert the server into a SERVICE. I can build the service
and get it to install and start/stop etc.
But,
I get an error like so upon running the service in non-blocking mode
(blocking mode gives no error and no results) :
ERROR MSG:
" Windows socket error: The requested name is valid and was found in the
database, but it does not have the correct associated data being resolved
for (11004), on API 'ASync Lookup' "
Apparently, this means I need to set the ASyncStyles property of
TCustomWinSocket to include the events I want to handle.
But I am not sure how to do this - the help defines it like so:
<Code begins>
enum TAsyncStyle { asRead, asWrite, asOOB, asAccept, asConnect, asClose };
typedef Set<TAsyncStyle, asRead, asClose> TAsyncStyles;
__property TAsyncStyles ASyncStyles = {read=FAsyncStyles,
write=SetAsyncStyles, nodefault};
<Code ends>
How do I set these ASyncStyles please?
I tried an assignment, I tried using SetASyncStyles, I included sysset.h
Can not get it to work.
Also - on which event should I set these?
Regards,
Quentin
Technical Details
Message-ID:
<4577aa78@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,6fbabc84eb654d68,start X-Google-Thread: f5c5c,6fbabc84eb654d68,start X-Google-Attributes: gid11508e,gidf5c5c,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Quentin David Jones" <quentin.jones@romteck.com.spamprotect> Newsgroups: borland.public.cppbuilder.internet.socket,borland.public.cppbuilder.vcl.components.using Subject: ASync Lookup for ServerSocket in non-blocking ? Date: Thu, 7 Dec 2006 14:46:15 +0900 Lines: 45 Organization: Romteck P/L X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 NNTP-Posting-Host: 203.59.8.178 Message-ID: <4577aa78@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1165470328 203.59.8.178 (6 Dec 2006 21:45:28 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail