asyncio callback when data is read from the socket.
(self, t)
| 210 | # Socket read methods |
| 211 | |
| 212 | def data_received(self, t): |
| 213 | """asyncio callback when data is read from the socket.""" |
| 214 | if len(t) > 0: |
| 215 | self.recvbuf += t |
| 216 | self._on_data() |
| 217 | |
| 218 | def _on_data(self): |
| 219 | """Try to read P2P messages from the recv buffer. |