MCPcopy Create free account
hub / github.com/antirez/freakwan / flush_write_buffer

Method flush_write_buffer

networking.py:87–96  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

85 # the part we were not able to transfer to the socket still in the
86 # buffer for the next time.
87 def flush_write_buffer(self):
88 while True:
89 if len(self.wbuf) == 0: return
90 try:
91 written = self.socket.write(self.wbuf)
92 if written == 0: return
93 self.wbuf = self.wbuf[written:]
94 except:
95 # Handle socket errors in the read path.
96 return
97
98 # Write a message into the bot channel
99 def reply(self,reply):

Callers 1

runMethod · 0.95

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected