Jump to content
  • Advertisement
Sign in to follow this  
jayapalchandran

what is the difference in winInet functions and sockets for connecting to ftp servers

This topic is 3857 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i am creating a ftp program using winInet in win32... in non asynchronous mode(no callback). it is connecting and when i use the ftpgetcurrentdirectory then return value whether true or false is immediate but actually the operation takes some time... how to detect whether the function has ended or not...? i dont want to use callbacks for this... but what i did was i used a timer to check the buffer whether the function returned any string... i feel this aint a proper way... and when i used the asynchronous mode i used a callback function in that there are many defined constants for which the compiler says undefined symbol... i am using dev-c++ IDE bu including the needed library in my project... the call back function is called for opening and connecting to the server but not when i use the ftp_ functions... i am toggling between various methods to acheive some positive result but there wasnt a favorable result... phew and then i tried to use sockets like i used it for my own http request to my server... what will be the better way to use sockets to connect to the ftp server??? oh this line is the actual purpose of this big explanation... so this is my problem... so i am calling this command : CTRL + A and F1 ...

Share this post


Link to post
Share on other sites
Advertisement
If you want non-blocking calls that you can check the status of, I would imagine you should use the asynchronous version, or a select() loop to check when sockets have data available. However you seem to be using an FTP library, not doing the FTP yourself, so check the documentation for the library to see whether some status information is available to you directly.

Share this post


Link to post
Share on other sites
actually i wanted to do using sockets... then what would be your words for doing that... also you have mentioned that a select() loop would help... if you could give me an example in words that will be nice...

Share this post


Link to post
Share on other sites
I'm going to leave this question to someone who knows about sockets in C++ (I use C# and that's not relevant to you). There are plenty of them so it should get answered soonish.

FTP is a text based protocol similar to HTTP; ask Google about it, but writing a simple FTP client is fairly easy.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!