renamed functions to not conflict with builtin socket functions