def dataReceived(self, data):
        self.buffer += data
        while '\0' in self.buffer:
            I = self.buffer.index('\0')
            message = self.buffer[:I]
            self.buffer = self.buffer[I+1:]
            self.gotMessage(message)
dataset/ETHPy150Open twisted/nevow/nevow/canvas.py/CanvasSocket.dataReceived/original