SocketTools .NET Edition

NntpClient.GetHeaders Method (Int32, String)

Retrieves the headers for the specified article from the server.

[Visual Basic]
Overloads Public Function GetHeaders( _
   ByVal articleId As Integer, _
   ByRef buffer As String _
) As Boolean
[C#]
public bool GetHeaders(
   int articleId,
   ref string buffer
);

Parameters

articleId
An integer value which specifies the article to retrieve from the server. This value must be greater than zero.
buffer
A string passed by reference which will contain the article headers when the method returns.

Return Value

This method returns a boolean value. If the method succeeds, the return value is true. If the method fails, the return value is false. To get extended error information, check the value of the LastError property.

Remarks

The GetHeaders method is used to retrieve an article header block from the server and copy it into a local buffer. This method will cause the current thread to block until the article transfer completes, a timeout occurs or the transfer is canceled. During the transfer, the OnProgress event will fire periodically, enabling the application to update any user interface objects such as a progress bar.

The first available article in the newsgroup can be determined by checking the value of the FirstArticle property. The last available article in the newsgroup is returned by the LastArticle property.

See Also

NntpClient Class | SocketTools Namespace | NntpClient.GetHeaders Overload List