WIP: Start accepting extra socket options

Early review is always welcome (not that I've much done yet).