diff --git a/OpenOS/usr/lib/minitel.lua b/OpenOS/usr/lib/minitel.lua index cd06333..31cfca9 100644 --- a/OpenOS/usr/lib/minitel.lua +++ b/OpenOS/usr/lib/minitel.lua @@ -19,10 +19,10 @@ function net.usend(to,port,data,npID) computer.pushSignal("net_send",0,to,port,data,npID) end -function net.rsend(to,port,data,block,npID) - local pid, stime = npID or net.genPacketID(), computer.uptime() + net.streamdelay +function net.rsend(to,port,data,block) + local pid, stime = net.genPacketID(), computer.uptime() + net.streamdelay computer.pushSignal("net_send",1,to,port,data,pid) - if block then return false end + if block then return pid end repeat _,rpid = event.pull(0.5,"net_ack") until rpid == pid or computer.uptime() > stime diff --git a/OpenOS/usr/man/minitel b/OpenOS/usr/man/minitel index 0f7cd6f..eb4e4f1 100644 --- a/OpenOS/usr/man/minitel +++ b/OpenOS/usr/man/minitel @@ -71,7 +71,7 @@ The minitel library provides an easy way of interacting with the minitel daemon, *minitel.usend(host, port, data, pid)* - Sends an unreliable packet to *host* on *port* containing *data*, optionally with the packet ID *pid*. -*minitel.rsend(host, port, data, block)* - Sends a reliable packet to *host* on *port* containing *data*. If *block* is true, don't wait for a reply. +*minitel.rsend(host, port, data, block)* - Sends a reliable packet to *host* on *port* containing *data*. If *block* is true, don't wait for a reply, instead return the packet ID. #### Layer 4