CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: FTP :: Anyone?

  1. #1
    Join Date
    Jul 2005
    Location
    Louisville, KY
    Posts
    201

    FTP :: Anyone?

    Hello, I'm curious if anyone would know where I could find a good standard or template, to help me, implement my own aysnchronous ftp client (TCP).

    I understand the concept of an asynchronous server/client, that sends pure text back and fourth, but I've never messed with the FTP side of things.

    Can anyone please help? or show me in the right direction?

  2. #2
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652

  3. #3
    Join Date
    Jul 2005
    Location
    Louisville, KY
    Posts
    201

    Re: FTP :: Anyone?

    Danke, Andreas Masur, fur deine hilfe.

  4. #4
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652

    Re: FTP :: Anyone?

    You are welcome...

  5. #5
    Join Date
    Apr 2005
    Posts
    62

    Re: FTP :: Anyone?

    The specification of FTP: http://www.faqs.org/rfcs/rfc959.html

  6. #6
    Join Date
    Jun 2002
    Location
    Madrid - Spain
    Posts
    28

    Re: FTP :: Anyone?

    I think that the MFC classes CInternetSession, CFtpConnection & CFtpFileFind would help you a lot.

    A little example:
    Code:
    CInternetSession sess;
    
    CFtpConnection* pConnect = NULL;
    
    try
    	{
    	pConnect = sess.GetFtpConnection(sFtpServer, sFtpUser, sFtpPassword);
    	}
    catch (CInternetException* pEx)
    	{
    	return ;
    	}
    
    CFtpFileFind finder(pConnect);
    bFileFound = finder.FindFile("*.*");
    if (bFileFound)
    	{
    	finder.FindNextFile();
    	sFileName = finder.GetFilePath();
    	BOOL bRes = pConnect->GetFile( sFileName, "MyFileName", FALSE);
    	}
    
    if (pConnect != NULL)
    	{
    	pConnect->Close();
    	delete pConnect;
    	}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured