Article View: news.software.nntp
Article #69666Re: POST -> no response, but message is posted.
From: Andrew - Supernews
Date: Sun, 08 Aug 2004 12:52
Date: Sun, 08 Aug 2004 12:52
51 lines
3272 bytes
3272 bytes
On 2004-08-08, Florian Zschocke <edv@zschocke-berlin.de> wrote: > Andrew - Supernews <andrew+nonews@supernews.com> wrote: >>How long do you wait for it? >> > Not at all at the moment. I send the data and if that is done I read > from the socket. That's no good at all. How are you dealing with other command-response sequences? > So what can I do ? A generic wait will not help. I could loop until > select() gives a positive value but that will be too expensive ? select() with a suitable timeout? It sounds to me as though you have written your application in complete ignorance of basic programming principles. You can not possibly assume that all server responses will be immediately available as soon as you look for them; you will _always_ have to allow for the possibility that you have to wait for the server. Posting is no different from any other commands in this respect (unless of course you are a spammer). How you go about waiting depends entirely on the programming model you are using for your application - you might choose to block the thread, or to use an event-driven state model, or any of a number of other variations. >>Just make sure you use the same message-id both times, that's enough. >> > For the application it would be better not to wait. If you say, wait > two seconds to get all the responses,I would say ok lets pause the > thread for that time. If I don't wait ? The fact that you are even asking this question shows that you do not understand what you are trying to do. You do not and can not know whether your POST succeeded until you get the server's response. Furthermore, pipelining POST commands is forbidden, which means that you MUST NOT send any more commands to the server until you get the server's response back after sending the article. > My server gives me a a desired message-id with the 340 response. Can I > use this ID or is that a uncommon feature and it is better to generate > the id myself ? The "recommended ID" feature isn't universal; you can't rely on it at all. (Our server doesn't support it, for example, since it has no way of knowing which domain to use for the RHS). -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services
Technical Details
Message-ID:
<slrnchc8gv.1pnu.andrew+nonews@trinity.supernews.net>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!sn-xit-02!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mailReferences:
<slrnchc18b.1pnu.andrew+nonews@trinity.supernews.net> <41160f3c$0$7309$9b4e6d93@newsread2.arcor-online.net>Show Full Headers
Complete Article Headers
Message-ID: <slrnchc8gv.1pnu.andrew+nonews@trinity.supernews.net> Subject: Re: POST -> no response, but message is posted. Date: Sun, 08 Aug 2004 12:52:47 -0000 From: Andrew - Supernews <andrew+nonews@supernews.com> References: <slrnchc18b.1pnu.andrew+nonews@trinity.supernews.net> <41160f3c$0$7309$9b4e6d93@newsread2.arcor-online.net> 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!sn-xit-02!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Newsgroups: news.software.nntp Organization: http://www.supernews.com - all your nntp are belong to us Reply-To: andrew@supernews.com User-Agent: slrn/0.9.8.0 (FreeBSD) X-Complaints-To: abuse@supernews.com Lines: 51