def _on_tty_read(self, handle, data, error):
        if not data:
            self.should_close = True
            return

        data = data.strip()
        if data == b".":
            self.stop()
        else:
            data = data.decode('utf-8') + os.linesep
            self.socket.write(data, self._on_tty_done)
dataset/ETHPy150Open benoitc/gaffer/gaffer/cli/commands/send.py/Send._on_tty_read/original