ritesh_ravlani wrote: > Hi, > > Myself Ritesh Ravlani, > > > i have to develop File transfer application between Two > Computers using c or c++, and don't know much abt it,so if possible > give me some code or Idea, as soon as possible
There's the _ANCIENT_ FTP protocol. Insecure, loads of problems, requires two TCP sockets, and generally annoying to program for. Everyone recommends it for whatever reason. Really, if this is a homework assignment, you don't need a full-blown FTP client/server. If you did, I'd just point the professor to the FileZilla server and client and say, "That's a good enough project used by millions of people. Need anything else?" The simplest approach to a file transfer homework assignment is to write a TCP server and client. Server says "Hello" on connection, client receives/verifies the hello and then says, "Here's the filename to save data as". Server says, "OK". Then client gets "OK" and says, "Here's the file size." Server responds with "OK". Client gets "OK" and sends the file data. Then sever responds with "OK". Client then receives "OK" and disconnects. That's the basic assignment most students are given. I call that the "lock-step" approach and it is guaranteed to work. You send something and expect to get something back before moving on to the next step - that is, your app. locks until it gets a response. Lock-step is slow, though, compared to protocols that allow multiple commands before getting responses. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* VerifyMyPC 2.1 Change tracking and management tool. Reduce tech. support times from 2 hours to 5 minutes. Free for personal use, $10 otherwise. http://www.CubicleSoft.com/VerifyMyPC/
