lua-sockets: refactored setsockopts.