def get_header_obj(self):
        """Get the underlying C reference from this object.

        :rtype: uamqp.c_uamqp.cHeader
        """
        header = c_uamqp.create_header()
        header.delivery_count = self.delivery_count or 0
        if self.time_to_live is not None:
            header.time_to_live = self.time_to_live
        if self.first_acquirer is not None:
            header.first_acquirer = self.first_acquirer
        if self.durable is not None:
            header.durable = self.durable
        if self.priority is not None:
            header.priority = self.priority
        return header
示例#2
0
 def __init__(self, header=None):
     self._header = header if header else c_uamqp.create_header()