1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-09 03:48:07 +11:00
OC-Minitel/Embedded/microtel-4.lua

16 lines
306 B
Lua
Raw Normal View History

net.mtu = 4096
function net.send(to,vport,ldata)
local tdata = {}
if ldata:len() > net.mtu then
for i = 1, ldata:len(), net.mtu do
tdata[#tdata+1] = ldata:sub(1,net.mtu)
ldata = ldata:sub(net.mtu+1)
end
else
tdata = {ldata}
end
for k,v in ipairs(tdata) do
net.rsend(to,vport,v)
end
end