use of nars.task.ActiveQuestionTask in project narchy by automenta.
the class InterNAR method receive.
void receive(UDPeer.UDProfile from, UDPeer.Msg m, Task x) {
if (x.isQuestOrQuestion()) {
// reconstruct a question task with an onAnswered handler to reply with answers to the sender
x = new ActiveQuestionTask(x, 8, nar, (q, a) -> accept(nar, q, a));
x.meta("UDPeer", m);
}
x.budget(nar);
// System.out.println(me + " RECV " + x + " " + Arrays.toString(x.stamp()) + " from " + m.origin());
logger.debug("recv {} from {}", x, from);
recv.input(x);
}
Aggregations