Поделиться через


CInternetSession::GetGopherConnection

Call this member function to establish a new gopher connection and get a pointer to a CGopherConnection object.

CGopherConnection* GetGopherConnection(
   LPCTSTR pstrServer,
   LPCTSTR pstrUserName = NULL,
   LPCTSTR pstrPassword = NULL,
   INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER 
);

Параметры

  • pstrServer
    A pointer to a string containing the gopher server name.

  • pstrUserName
    A pointer to a string containing the user name.

  • pstrPassword
    A pointer to a string containing the access password.

  • nPort
    A number that identifies the TCP/IP port to use on the server.

Возвращаемое значение

A pointer to a CGopherConnection object. If the call fails, determine the cause of the failure by examining the thrown CInternetException object.

Заметки

GetGopherConnection connects to a gopher server, and creates and returns a pointer to a CGopherConnection object. It does not perform any specific operation on the server. If you intend to read or write data, for example, you must perform those operations as separate steps. See the classes CGopherConnection, CGopherFile, and CGopherFileFind for information about searching for files, opening files, and reading or writing to files. For information about browsing an FTP site, see the member function OpenURL. See the article Internet Programming with WinInet for steps in performing common gopher connection tasks.

Исключения

This method can throw exceptions of type CInternetException*.

Требования

Header: afxinet.h

См. также

Основные понятия

CInternetSession Class

CInternetSession Members

Hierarchy Chart

CGopherConnection Class

CInternetSession::GetFtpConnection

CInternetSession::GetHttpConnection

CInternetSession::OpenURL