'get default sockopts as attributes'

def _get_attr_opt(self, name, opt):

    if (name in constants.ctx_opt_names):
        return self.get(opt)
    elif (opt not in self.sockopts):
        raise AttributeError(name)
    else:
        return self.sockopts[opt]
