update varname to camelcase
instead of wrapping in a domain, use the socket error event