Article View: borland.public.cppbuilder.internet.socket
Article #5728Re: Linux and Windows compatible Client/Server apps using UDP and TCP/IP without any components?
From: Chad Z. Hower aka Kudzu
Date: Thu, 29 Apr 2004 18:02
Date: Thu, 29 Apr 2004 18:02
28 lines
2626 bytes
2626 bytes
"Eugene Mayevski [SecureBlackbox]" <mayevski@eldos.org> wrote in
news:40913877@newsgroups.borland.com:
>>>while not TerminateOperation do
>>> select(1, FSocket, nil, nil, 10);
>>>if not TerminateOperation then
>>> read(FSocket...);
>> This type is also on one socket - and since it calls select after on one
>> socket its essentially a blocking model.
Aah I see the loop now. But now you are polling and using CPU. And you still
have the problem of you are only using one socket here in this example and
you have implemented a trivial task.
Implementing a basic read versus implementing a real server is very different
in complexity and how blocking vs non blocking works.
This simple example above can be done using Indy as is by selecting before
hand too.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Need extra help with an Indy problem?
http://www.atozed.com/indy/experts/
Technical Details
Message-ID:
<Xns94DAD60366F1cpub@127.0.0.1>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!KudzuReferences:
<408940c8$1@newsgroups.borland.com> <4089b966@newsgroups.borland.com> <Xns94D754C7FDA13cpub@127.0.0.1> <408cb3a2@newsgroups.borland.com> <Xns94D7D254D5B83cpub@127.0.0.1> <408d7e2a$1@newsgroups.borland.com> <Xns94D8666CA914Bcpub@127.0.0.1> <408e168e@newsgroups.borland.com> <Xns94D8A2AD83860cpub@127.0.0.1> <408f59a4$1@newsgroups.borland.com> <Xns94D9792CD8562cpub@127.0.0.1> <408fdf4f$1@newsgroups.borland.com> <Xns94D9EBFF4B55Fcpub@127.0.0.1> <40913877@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11508e,7ff7d57992a0c98e X-Google-Thread: 1036eb,cc69d1fdd62435b3 X-Google-Thread: fc17a,58ba8da04ce4f6ff X-Google-Attributes: gid11508e,gid1036eb,gidfc17a,public X-Google-ArrivalTime: 2004-04-29 11:35:37 PST Newsgroups: borland.public.cppbuilder.internet.socket,borland.public.delphi.internet.winsock,borland.public.kylix.internet.sockets Subject: Re: Linux and Windows compatible Client/Server apps using UDP and TCP/IP without any components? From: "Chad Z. Hower aka Kudzu" <cpub@hower.org> References: <408940c8$1@newsgroups.borland.com> <4089b966@newsgroups.borland.com> <Xns94D754C7FDA13cpub@127.0.0.1> <408cb3a2@newsgroups.borland.com> <Xns94D7D254D5B83cpub@127.0.0.1> <408d7e2a$1@newsgroups.borland.com> <Xns94D8666CA914Bcpub@127.0.0.1> <408e168e@newsgroups.borland.com> <Xns94D8A2AD83860cpub@127.0.0.1> <408f59a4$1@newsgroups.borland.com> <Xns94D9792CD8562cpub@127.0.0.1> <408fdf4f$1@newsgroups.borland.com> <Xns94D9EBFF4B55Fcpub@127.0.0.1> <40913877@newsgroups.borland.com> Organization: Atozed Software Message-ID: <Xns94DAD60366F1cpub@127.0.0.1> User-Agent: Xnews/5.04.25 via ELKNews 1.1 X-Face: '-Al!t=o!k-s4*bktmv/YpA=fm9"8xdyO,t[~R2]W/c%[qF:])&(mBp$XI^d:Tmlr&&>S;aBs0DIl;0Fv|\3fb(#vsf)1;[;m0x&<RC/,7]DSa Lines: 27 Date: Thu, 29 Apr 2004 21:02:18 +0300 NNTP-Posting-Host: 83.168.5.183 X-Trace: newsgroups.borland.com 1083263459 83.168.5.183 (29 Apr 2004 11:30:59 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!Kudzu