Using getopt() for argument parsing

ConnectSocket is now global, as is host and port