Start accepting extra socket options

Early review is always welcome (not that I've much done yet).
the socket creation was moved just above here so this is superfluous.