Returns serialized bytes object representing all headers/
        payloads in this packet

def to_bytes(self):
        '''
        Returns serialized bytes object representing all headers/
        payloads in this packet'''
        rawlist = []
        i = len(self._headers)-1
        while i >= 0:
            self._headers[i].pre_serialize(b''.join(rawlist), self, i)
            rawlist.insert(0, self._headers[i].to_bytes())
            i -= 1
        self._raw = b''.join(rawlist)
        return self._raw