Changed create_socket to accept host and port