Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add cython pxd file for _listener.py to improve incoming messag…
…e processing performance (#1221)
- Loading branch information
Showing
2 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
import cython | ||
|
||
|
||
cdef object millis_to_seconds | ||
cdef object log | ||
cdef object logging_DEBUG | ||
|
||
from ._protocol.incoming cimport DNSIncoming | ||
|
||
|
||
cdef class AsyncListener: | ||
|
||
cdef public object zc | ||
cdef public cython.bytes data | ||
cdef public cython.float last_time | ||
cdef public DNSIncoming last_message | ||
cdef public object transport | ||
cdef public object sock_description | ||
cdef public cython.dict _deferred | ||
cdef public cython.dict _timers | ||
|
||
@cython.locals(now=cython.float, msg=DNSIncoming) | ||
cpdef datagram_received(self, cython.bytes bytes, cython.tuple addrs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters