Provided helper function to accept sockets