We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 126bcd2 commit 90ad415Copy full SHA for 90ad415
buffer.pxd
@@ -34,6 +34,7 @@ cdef class WriteBuffer:
34
cdef inline _check_readonly(self)
35
cdef inline _ensure_alloced(self, ssize_t extra_length)
36
cdef _reallocate(self, ssize_t new_size)
37
+ cdef inline reset(self)
38
cdef inline start_message(self, char type)
39
cdef inline end_message(self)
40
cdef write_buffer(self, WriteBuffer buf)
buffer.pyx
@@ -113,6 +113,10 @@ cdef class WriteBuffer:
113
hton.pack_int32(&self._buf[1], <int32_t>mlen)
114
return self
115
116
+ cdef inline reset(self):
117
+ self._length = 0
118
+ self._message_mode = 0
119
+
120
cdef write_buffer(self, WriteBuffer buf):
121
self._check_readonly()
122
0 commit comments