1

So, I have a desktop application and I want it to be able to check a website for new versions of itself. I am completely new to sockets (Windsocks and Berkeley), so before I invest time learning network programming I want some guidance to point me in the right direction.

The application is going to pretty much download an installation file from its website. The connection will not be secure as it doesn't matter if users can see it or not. Also the application's website will most likely be hosted @ godaddy (in case somebody wants to be specific).

So my questions are; What technology should I be looking into, FTP, TCP or UDP? What are some things I should keep in mind as far as the client/server communication when it comes to file transfer with a remote server? Does anybody knows if godaddy allows this type of thing?

PS. If you think this might be a little too much to accomplish without enough theoretical/technical background, then please don't hesitate to recommend a book.

Miguel
  • 872
  • 1
  • 12
  • 26

1 Answers1

3

Use HTTP, and use a library to download a URL to a file. This should take 1-5 lines of code.

Why build a file transfer protocol yourself using sockets? Everything you need is built-in with HTTP. There are pre-made clients and servers available.

usr
  • 168,620
  • 35
  • 240
  • 369
  • Yes, definately use a pre-made library, such as [Curl](http://curl.haxx.se/), [WinInet](http://msdn.microsoft.com/en-us/library/windows/desktop/aa385331.aspx), [WinHTTP](http://msdn.microsoft.com/en-us/library/windows/desktop/aa384273.aspx), [`URLDownloadToFile()`](http://msdn.microsoft.com/en-us/library/ms775123.aspx), etc. HTTP is very widespread, but it is also not trivial to implement **correctly**, so let someone else do the hard work for you, especially if you do not understand the basics of network programming yet. – Remy Lebeau Dec 30 '13 at 19:15
  • This sounds like a solid idea. I will look into those libraries and go from there. WinHTTP looks really good, but my application will also run on the OSx and Linux, are there any equivalents? – Miguel Dec 30 '13 at 19:41