🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13135

Re: Non-blocking Sockets

#13135
From: Michel Leunen
Date: Tue, 28 Oct 2003 16:33
20 lines
1710 bytes
Mike King wrote:
> Is this code using non-blocking sockets?

First, you'd better ask question about socket programming in the 
.internet.socket group.

No, your code uses blocking socket. When you create a socket, it's 
blocking by default unless you tell it to be non-blocking. Look at 
ioctlsocket() on how to change the socket mode. Alternatively, with 
windows, you can use overlapped sockets, look at the WSAxxx() functions.
There are several tutorials on the web about sockets. Use google and do 
a search.

Michel
-- 
----------------------------------------
Michel Leunen
mailto:michel@leunen.com
http://www.leunen.com/cbuilder/
----------------------------------------
Technical Details
Message-ID: <3f9e9a58@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f9e89cd$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,bb15a7a8b7638d84
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-28 08:40:25 PST
Date: Tue, 28 Oct 2003 17:33:18 +0100
From: Michel Leunen <mleu@STOPSPAMskynet.be>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Non-blocking Sockets
References: <3f9e89cd$1@newsgroups.borland.com>
In-Reply-To: <3f9e89cd$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.240.244.246
Message-ID: <3f9e9a58@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1067358808 81.240.244.246 (28 Oct 2003 08:33:28 -0700)
Lines: 21
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail