mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-23 10:38:05 +11:00
removed some unneccesary code from microtel-4
This commit is contained in:
parent
a4899c9854
commit
cad7de5c38
@ -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
|
||||
|
@ -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}
|
||||
end
|
||||
for k,v in ipairs(tdata) do
|
||||
net.rsend(to,vport,v)
|
||||
net.send(to,vport,v)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user