C# 클래스 NntpClient.Client

Connects & performs operations on a usenet server.
상속: IDisposable
파일 보기 프로젝트 열기: strider-/NntpClient

공개 메소드들

메소드 설명
ArticleExists ( string messageId ) : bool

Gets whether or not the article is available to download.

ArticleExists ( ulong articleId ) : bool

Gets whether or not the article is available to download.

Authenticate ( string user, string pass ) : void

Authenticates credentials against the current server.

Client ( ) : System

Creates a new intance of the client.

Close ( ) : ConnectionResult

Closes the connection & returns the statistics of the session.

Connect ( string hostname, int port, bool ssl ) : void

Opens a connection to the given usenet server on the specified port, and whether or not to use ssl.

Date ( ) : System.DateTime

Gets the current UTC date/time on the server.

Dispose ( ) : void

Closes the connection & disposes of managed resources.

GetArticle ( string messageId, bool bodyOnly = false ) : Article

Downloads an article from usenet with the given ID. Returns null if the article could not be found.

GetArticle ( ulong articleId, bool bodyOnly = false ) : Article

Downloads an article from usenet with the given ID. Returns null if the article could not be found.

GetGroups ( ) : IEnumerable

Returns a collection of available usenet groups.

GetHeaders ( string messageId ) : string>.Dictionary

Fetches only the headers of a message with the given message ID.

GetHeaders ( ulong articleId ) : string>.Dictionary

Fetches only the headers of a message with the given article ID.

GetOverviewFormat ( ) : IEnumerable

Fetches all overview fields supported by the server as a list.

GetXOverview ( ulong articleStart, ulong articleEnd ) : IEnumerable

Fetches overview database information from a group within a given range of article ids. A call to SetGroup must be made before calling this method or it will fail.

SetGroup ( string groupName ) : Group

Sets the current usenet group pointer.

SetGroup ( Group group ) : bool

Sets the current usenet group pointer.

비공개 메소드들

메소드 설명
CleanUp ( ) : void
ProcessArticle ( ServerReply result, bool bodyOnly ) : Article
ReadHeader ( ) : string>.Dictionary
SetMode ( string mode ) : void

메소드 상세

ArticleExists() 공개 메소드

Gets whether or not the article is available to download.
public ArticleExists ( string messageId ) : bool
messageId string Message-ID of the article
리턴 bool

ArticleExists() 공개 메소드

Gets whether or not the article is available to download.
public ArticleExists ( ulong articleId ) : bool
articleId ulong
리턴 bool

Authenticate() 공개 메소드

Authenticates credentials against the current server.
public Authenticate ( string user, string pass ) : void
user string Usenet username
pass string Usenet password
리턴 void

Client() 공개 메소드

Creates a new intance of the client.
public Client ( ) : System
리턴 System

Close() 공개 메소드

Closes the connection & returns the statistics of the session.
public Close ( ) : ConnectionResult
리턴 ConnectionResult

Connect() 공개 메소드

Opens a connection to the given usenet server on the specified port, and whether or not to use ssl.
public Connect ( string hostname, int port, bool ssl ) : void
hostname string Usenet hostname
port int Port to connect on
ssl bool Uses a secure connection if true
리턴 void

Date() 공개 메소드

Gets the current UTC date/time on the server.
public Date ( ) : System.DateTime
리턴 System.DateTime

Dispose() 공개 메소드

Closes the connection & disposes of managed resources.
public Dispose ( ) : void
리턴 void

GetArticle() 공개 메소드

Downloads an article from usenet with the given ID. Returns null if the article could not be found.
public GetArticle ( string messageId, bool bodyOnly = false ) : Article
messageId string
bodyOnly bool Whether or not to pull down headers with the article or not.
리턴 Article

GetArticle() 공개 메소드

Downloads an article from usenet with the given ID. Returns null if the article could not be found.
public GetArticle ( ulong articleId, bool bodyOnly = false ) : Article
articleId ulong
bodyOnly bool Whether or not to pull down headers with the article or not.
리턴 Article

GetGroups() 공개 메소드

Returns a collection of available usenet groups.
public GetGroups ( ) : IEnumerable
리턴 IEnumerable

GetHeaders() 공개 메소드

Fetches only the headers of a message with the given message ID.
public GetHeaders ( string messageId ) : string>.Dictionary
messageId string Message Id
리턴 string>.Dictionary

GetHeaders() 공개 메소드

Fetches only the headers of a message with the given article ID.
public GetHeaders ( ulong articleId ) : string>.Dictionary
articleId ulong Article Id
리턴 string>.Dictionary

GetOverviewFormat() 공개 메소드

Fetches all overview fields supported by the server as a list.
public GetOverviewFormat ( ) : IEnumerable
리턴 IEnumerable

GetXOverview() 공개 메소드

Fetches overview database information from a group within a given range of article ids. A call to SetGroup must be made before calling this method or it will fail.
public GetXOverview ( ulong articleStart, ulong articleEnd ) : IEnumerable
articleStart ulong The start of the article range to pull overview information for.
articleEnd ulong The end of the article range to pull overview information for.
리턴 IEnumerable

SetGroup() 공개 메소드

Sets the current usenet group pointer.
public SetGroup ( string groupName ) : Group
groupName string
리턴 Group

SetGroup() 공개 메소드

Sets the current usenet group pointer.
public SetGroup ( Group group ) : bool
group Group
리턴 bool