2023-10-12 20:12:39 +02:00
|
|
|
import cython
|
|
|
|
|
|
|
|
from .base cimport APIFrameHelper
|
|
|
|
|
|
|
|
|
2023-10-13 03:17:46 +02:00
|
|
|
cdef bint TYPE_CHECKING
|
2023-10-12 20:12:39 +02:00
|
|
|
cdef object WRITE_EXCEPTIONS
|
|
|
|
cdef object bytes_to_varuint, varuint_to_bytes
|
|
|
|
|
|
|
|
cdef class APIPlaintextFrameHelper(APIFrameHelper):
|
|
|
|
|
|
|
|
@cython.locals(
|
|
|
|
msg_type=bytes,
|
|
|
|
length=bytes,
|
2023-10-13 03:17:46 +02:00
|
|
|
init_bytes=bytes,
|
|
|
|
add_length=bytes,
|
2023-10-12 20:12:39 +02:00
|
|
|
end_of_frame_pos=cython.uint,
|
|
|
|
length_int=cython.uint,
|
|
|
|
preamble=cython.uint,
|
|
|
|
length_high=cython.uint,
|
|
|
|
maybe_msg_type=cython.uint
|
|
|
|
)
|
2023-10-13 03:17:46 +02:00
|
|
|
cpdef data_received(self, bytes data)
|