Internet Direct (Indy) Version 9.0.1 Beta
TIdNNTP.Connect
Opens a connection to the news server.

procedure Connect(const ATimeout: Integer); override;
Description
Connect attempts to open a connection to an NNTP server using the Host and Port properties. Connect will update the GreetingResult property to show the state of the connection request. Applications should use GreetingResult to determine if further action is warranted.

An EIdNNTPConnectionRefused exception can be raised, under some conditions, when a connection request is explicitly refused by the NNTP server.

Note: If an Exception is encountered, Connect will call the Disconnect method and re-raise the Exception.

Connect will also establish the NNTP mode as indicated by TIdNNTP.Mode for mode types mtStream and mtReader.