Use code generation for socket setters.

This only brings in the 3.x setters (no getters and no other versions)
but it shows the idea.