pex: add utility function to get the sockets based on type / address family