1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-12-25 09:58:04 +11:00

removed some unneccesary code from microtel-4

This commit is contained in:
Izaya 2018-03-18 13:48:13 +11:00
parent a4899c9854
commit cad7de5c38
2 changed files with 5 additions and 13 deletions

View File

@ -1,14 +1,10 @@
net.mtu=4096
function net.send(T,P,L)
local D={}
if L:len()>net.mtu then
for i=1,L:len(),net.mtu do
D[#D+1]=L:sub(1,net.mtu)
L=L:sub(net.mtu+1)
end
else
D={L}
end
for k,v in ipairs(D) do
net.rsend(T,P,v)
end

View File

@ -1,15 +1,11 @@
net.mtu = 4096
function net.send(to,vport,ldata)
function net.lsend(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}
for i = 1, ldata:len(), net.mtu do
tdata[#tdata+1] = ldata:sub(1,net.mtu)
ldata = ldata:sub(net.mtu+1)
end
for k,v in ipairs(tdata) do
net.rsend(to,vport,v)
net.send(to,vport,v)
end
end