正在加载图片...
CString CMyWinInetClass: ConnectGopher( const CString sUrl [CString sResult CInternetFile *hGopherFile=NULL rEsult sResult-sResult+ Trying to connect Gopher sites +sUr/+In, h GopherFile-(CInternetFile )m_session. OpenURL(sUr/ ∥得到文件指针 if(h GopherFile) isResult-sResult+"Connection established. rIn", CString sLine Whe( hGopherFile> ReadString(sLie∥读取 Gopher服务器内容 sResult-sResulfsLine+rin hGopherFile->Closed ∥结束连接 else sResultsResult+There are some errors in finding this Gopher sites", return rEsult23 CString CMyWinInetClass::ConnectGopher(const CString sUrl) { CString sResult; CInternetFile *hGopherFile=NULL; sResult=""; sResult=sResult+"Trying to connect Gopher sites"+sUrl+"\r\n"; hGopherFile=(CInternetFile *)m_session.OpenURL(sUrl); //得到文件指针 if(hGopherFile) { sResult=sResult+"Connection established.\r\n"; CString sLine; while(hGopherFile->ReadString(sLine)) //读取Gopher服务器内容 sResult=sResult+sLine+"\r\n"; hGopherFile->Close(); //结束连接 } else sResult=sResult+"There are some errors in finding this Gopher sites"; return sResult; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有