Mastodon
Programmierung

Getting New NNTP Messages

>>>No, this is not possible. Messages are requested from the server by
>>>reference. Dates are not specified in the NNTP protocol standards.
>>>
>>I beg to differ with you on that point. RFC977 describes a command
>>called NEWGROUPS which takes a time/datestamp parameter.
>
>it retrieves new groups, not new messages
>

Forgive my misinterpretation. The best way to handle that situation
is to store the last article value from the GROUP command and use that
to compare with the next GROUP command.

HTH.

>probably you thought about newnews command, but this command is
>uncertain because time on server and/or client can be incorrect, you
>need ask about earlier messages to prevent losting
>
I can see that. However, RFC 977 permits a parameter after the
date/time called GMT which means that this is based on the 0 Meridian
(the old Greenwich observatory). I just record the last time the
news group list was updated based upon the System time (also based on
GMT).

Here’s the code I execute immediately after the NEWGROUP command
completes which puts the time in the variable fLastUpdate.

GetSystemTime(t); {Get’s the system time which is based upon UL
(a.k.a GMT)}
fLastUpdate := SystemTimeToDateTime(t); {Convert the value we
received into a TDateTime}

HTH.

[tags]Delphi, Internet[/tags]

0 Kommentare zu “Getting New NNTP Messages

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.