🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #69677

Re: POST -> no response, but message is posted.

#69677
From: Florian Zschocke
Date: Mon, 09 Aug 2004 08:05
34 lines
2710 bytes
curt@kcwc.com (Curt Welch) wrote:
>
Thank you for your detailed answer
>
>Protocols like NNTP do not require the more complex non-blocking reads.
>However, if you want a program which is dealing with multiple connections
>at the same time, you need non-blocking reads so that the program can work
>on a response from one connection, while waiting for the next response on
>the second connection.
>
Now I'm sure that I use a *blocking* socket, cause non-blocking is 
never set with fnctl().  

>If your program is not trying to do anything else while it's waiting for
>the response from the server, then you should use a blocking read, instead
>of using a non-blocking read, and sleeping for 500 ms between checks for
>data.  It's poor technique to force your program to delay for 500 ms if the
>server you are using responds in 5 ms.
>
Like you mentioned before that this did not change anything in the 
behavior of my program. I don't use select() anymore. 
What I do now, to speed up things and get the GUI more independent I 
detach the time consuming download from the server as thread. If you 
download a binary and step to the next message while the socket is 
busy, I make up a new socket, so that the user don't has to wait. In 
praxis that won't happen often but perhaps I have to limit the number 
sockets to protect the server. 
Is that bad style ? Could I do the same I do now with multiple bocking 
sockets with one non-blocking socket ? 
 

Thank you for your time and help

Florian
Technical Details
Message-ID: <EDE54D46-E9DA-11D8-947D-000393453BC2-2607-000001B1D80B7F9B%edv@zschocke-berlin.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed2.news.rcn.net!rcn!feed.news.tiscali.de!news.belwue.de!newsfeed.arcor.de!news.arcor.de!not-for-mail
References: <20040808224221.335$Rb@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <EDE54D46-E9DA-11D8-947D-000393453BC2-2607-000001B1D80B7F9B%edv@zschocke-berlin.de>
Subject: Re: POST -> no response, but message is posted.
Date: Mon, 09 Aug 2004 08:05:50 +0000
From: Florian Zschocke <edv@zschocke-berlin.de>
References: <20040808224221.335$Rb@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed2.news.rcn.net!rcn!feed.news.tiscali.de!news.belwue.de!newsfeed.arcor.de!news.arcor.de!not-for-mail
Newsgroups: news.software.nntp
User-Agent: Xnntp/beta02 (PPC Mac OS 10.3)
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: binary
Lines: 34
Organization: Arcor
NNTP-Posting-Date: 09 Aug 2004 10:05:50 MEST
NNTP-Posting-Host: c65ab897.newsread4.arcor-online.net
X-Trace: DXC=VIenX9TML7TjYMQID6OnPX:ejgIfPPldTjW\KbG]kaMXlSE5DYV?adQC9hPGk8IQ9TfLA7=4=P?HYk_HdP2i;
 :iS_oZ2; =onUhQ
X-Complaints-To: abuse@arcor.de