Most of my distributed scripts have an updater. I just have it check the download location for the version number (my pages for each script mention the version number). However, none of my scripts will automatically download/"install" updates. I've always felt that although doing so is easier, it feels to me like I'm forcing it on people. Some people don't want to update, or else don't like the idea of a script doing it automatically without their approval. If you want it to do an automatic update, then you would need to download the script and reload it.
There are various socket script examples on the forum. Do a search in this forum for sockopen and you should find some good examples.