I've given up on this idea.
I never found a way to make it work, but even if I eventually did, it would be so "non-standard" (nice way to say "kludgy") that I wouldn't want to rely on it.
I've talked my client into using static IP addresses assigned to the devices at installation. That way I can use sockets they way they were designed to be used.
I consider this question closed, but I don't know how to close it without awarding points.