complete initial socket functions