make it possible to rsend a packet and specify the packet ID

This commit is contained in:
Izaya 2019-04-18 13:24:35 +10:00
parent e579f1f567
commit 40c6f47f4d
1 changed files with 2 additions and 2 deletions

View File

@ -19,8 +19,8 @@ function net.usend(to,port,data,npID)
computer.pushSignal("net_send",0,to,port,data,npID)
end
function net.rsend(to,port,data,block)
local pid, stime = net.genPacketID(), computer.uptime() + net.streamdelay
function net.rsend(to,port,data,block,npID)
local pid, stime = npID or net.genPacketID(), computer.uptime() + net.streamdelay
computer.pushSignal("net_send",1,to,port,data,pid)
if block then return false end
repeat