'This adds the data to the buffer and/or sends it to the client
as soon as possible.
Args:
csessid (int): Session id.
data (list): A send structure [cmdname, [args], {kwargs}].'

def lineSend(self, csessid, data):

    request = self.requests.get(csessid)
    if request:
        request.write(jsonify(data))
        request.finish()
        del self.requests[csessid]
    else:
        dataentries = self.databuffer.get(csessid, [])
        dataentries.append(jsonify(data))
        self.databuffer[csessid] = dataentries
