Skip to content

Commit 4626399

Browse files
authored
feat: speed up incoming parser (#1163)
1 parent 86e5c4f commit 4626399

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/zeroconf/_protocol/incoming.pxd

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cdef cython.uint MAX_DNS_LABELS
77
cdef cython.uint DNS_COMPRESSION_POINTER_LEN
88
cdef cython.uint MAX_NAME_LENGTH
99

10+
cdef object current_time_millis
1011

1112
cdef cython.uint _TYPE_A
1213
cdef cython.uint _TYPE_CNAME
@@ -31,6 +32,18 @@ cdef object DECODE_EXCEPTIONS
3132

3233
cdef object IncomingDecodeError
3334

35+
from .._dns cimport (
36+
DNSAddress,
37+
DNSEntry,
38+
DNSHinfo,
39+
DNSNsec,
40+
DNSPointer,
41+
DNSRecord,
42+
DNSService,
43+
DNSText,
44+
)
45+
46+
3447
cdef class DNSIncoming:
3548

3649
cdef bint _did_read_others
@@ -64,6 +77,8 @@ cdef class DNSIncoming:
6477

6578
cdef _initial_parse(self)
6679

80+
cdef _unpack(self, object unpacker, object length)
81+
6782
@cython.locals(
6883
end=cython.uint,
6984
length=cython.uint

0 commit comments

Comments
 (0)