getPinsWithin converted for socket use

and the old way works too.