FTP Server Implementation C++
I have to implement a kind of FTP server in C++ for a school project. The goal is learn how the FTP works internally.
I'm a lil bit lost in how to start it. I know the FTP Protocol, but I still don't know what can I do to start 开发者_开发知识库coding.
Someone can point me a way to start? Some links, libs in C++, etc? Remembering that is a server side implementation.
Thanks in advance! :)
First off, read the relevant RFCs. Also record a few FTP sessions using something like Wireshark.From there you should get an idea of when messages are sent and what messages are received. You can the try duplicate the functionality to the point where it can do something useful. You will probably need to look at BSD sockets to do the actual network exchange. Good luck.
The API you are looking for is probably Winsock on Windows or Sockets on Unix (Linux). That covers all the networking calls you need. If you already know what the protocol looks like, that should get you going.
Visit http://msdn.microsoft.com/en-us/library/ms737593%28v=vs.85%29.aspx for complete Server Code. Go through the code and read about the APIs in MSDN.
Visit http://msdn.microsoft.com/en-us/library/ms737591%28v=vs.85%29.aspx for complete Client Code. Go through the code and read about the APIs in MSDN.
This is a simple Socket programming which I think can help you.
精彩评论