Thread: getting files from network/internet

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    157

    getting files from network/internet

    i was just reading up on petzold and he talks about FTP and it's usefulness. and i'm planning on writing this program where two computers have a form of communication with each other via either a network (lan) or the internet. but the way they would communicate would be through a server which would act as a middle man.

    and this server would have x amount of files that each computer on each end would be interested in. and when the computer logs on to the server that computer can view the file, etc.

    with my plan on this, i'm guessing i would use FTP to carry this out? and this would be the WinInet API, correct? or am i thinking of something else?

    i'm not really sure, because do i want to use WinSock to connect to a server (TCP/IP)? but if so, i would need to download files which would require FTP. but if i use FTP with WinInet will i be able to work with servers? you see my little interchangability problem?

    any ideas how i should go about this? thanks.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    FTP is a protocal that is implemented using winsock (or berkly sockets) - the API itself does not supply FTP functionality. You will have to come up with your own protocal for comunicatining between client and server - not a trivial task.

    gg

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    157
    so then i just connect to a server and then transfer files (data) accordingly. but the winsock lets me transfer data, right, so thats enough to just send a file over the network/internet. right?

    thanks

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Sure - its kinda like reading writting from streams, just a different set of API's and a different set of gotcha's.

    gg

  5. #5
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    You are still unsure of the design. Post a specific question after you have a design ready.

    Kuphryn

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. add source files to embedded VC 4.0
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2006, 03:28 AM
  2. *.cpp and *.h files understanding
    By ElastoManiac in forum C++ Programming
    Replies: 4
    Last Post: 06-11-2006, 04:45 AM
  3. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 11:46 AM
  4. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 02:41 PM
  5. header and source files
    By gtriarhos in forum C Programming
    Replies: 3
    Last Post: 10-02-2005, 03:16 AM