

def lineSend(self, suid, string, data=None):
    '\n        This adds the data to the buffer and/or sends it to the client\n        as soon as possible.\n\n        Args:\n            suid (int): Session id.\n            string (str): The text to send.\n            data (dict): Optional data.\n\n        Notes:\n            The `data` keyword is deprecated.\n\n        '
    request = self.requests.get(suid)
    if request:
        request.write(jsonify({
            'msg': string,
            'data': data,
        }))
        request.finish()
        del self.requests[suid]
    else:
        dataentries = self.databuffer.get(suid, [])
        dataentries.append(jsonify({
            'msg': string,
            'data': data,
        }))
        self.databuffer[suid] = dataentries

dataset/ETHPy150Open evennia/evennia/evennia/server/portal/webclient.py WebClient.lineSend/original