Article View: borland.public.cppbuilder.internet.socket
Article #5725Re: Linux and Windows compatible Client/Server apps using UDP and TCP/IP without any components?
From: Eugene Mayevski [SecureBlackbox]
Date: Thu, 29 Apr 2004 17:16
Date: Thu, 29 Apr 2004 17:16
20 lines
2451 bytes
2451 bytes
Chad Z. Hower aka Kudzu wrote: >>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. Really? Blocking more is when read() doesn't return until it completes the operation (or operation fails). From the code above you CAN'T conclude that it does so. The code above would work with non-blocking socket. Also, the above code lets you interrupt the operation without killing the socket from another thread. -- Eugene Mayevski EldoS Corp., CTO Security and networking solutions http://www.eldos.com
Technical Details
Message-ID:
<40913877@newsgroups.borland.com>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!not-for-mailReferences:
<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>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 10:20:17 PST Date: Thu, 29 Apr 2004 20:16:35 +0300 From: "Eugene Mayevski [SecureBlackbox]" <mayevski@eldos.org> Organization: EldoS Corporation User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, ru, en MIME-Version: 1.0 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? 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> In-Reply-To: <Xns94D9EBFF4B55Fcpub@127.0.0.1> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 82.144.222.199 Message-ID: <40913877@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1083258999 82.144.222.199 (29 Apr 2004 10:16:39 -0700) Lines: 21 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!not-for-mail