1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-26 03:48:06 +11:00

Compare commits

..

2 Commits

2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ end
function net.rsend(to,port,data,block) function net.rsend(to,port,data,block)
local pid, stime = net.genPacketID(), computer.uptime() + net.streamdelay local pid, stime = net.genPacketID(), computer.uptime() + net.streamdelay
computer.pushSignal("net_send",1,to,port,data,pid) computer.pushSignal("net_send",1,to,port,data,pid)
if block then return false end if block then return pid end
repeat repeat
_,rpid = event.pull(0.5,"net_ack") _,rpid = event.pull(0.5,"net_ack")
until rpid == pid or computer.uptime() > stime until rpid == pid or computer.uptime() > stime

View File

@ -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.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 #### Layer 4