Skip to content

Commit

Permalink
feat: speed up incoming parser (#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Apr 23, 2023
1 parent 86e5c4f commit 4626399
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/zeroconf/_protocol/incoming.pxd
Expand Up @@ -7,6 +7,7 @@ cdef cython.uint MAX_DNS_LABELS
cdef cython.uint DNS_COMPRESSION_POINTER_LEN
cdef cython.uint MAX_NAME_LENGTH

cdef object current_time_millis

cdef cython.uint _TYPE_A
cdef cython.uint _TYPE_CNAME
Expand All @@ -31,6 +32,18 @@ cdef object DECODE_EXCEPTIONS

cdef object IncomingDecodeError

from .._dns cimport (
DNSAddress,
DNSEntry,
DNSHinfo,
DNSNsec,
DNSPointer,
DNSRecord,
DNSService,
DNSText,
)


cdef class DNSIncoming:

cdef bint _did_read_others
Expand Down Expand Up @@ -64,6 +77,8 @@ cdef class DNSIncoming:

cdef _initial_parse(self)

cdef _unpack(self, object unpacker, object length)

@cython.locals(
end=cython.uint,
length=cython.uint
Expand Down

0 comments on commit 4626399

Please sign in to comment.