print(tmr.time());
data='123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_';
length=1000;
check=(5+length*string.len(data));
conn=net.createConnection(net.TCP, 0);
conn:on("receive", function(conn2,pl)
print(pl);
print(tmr.time());
conn2:close();
conn=nil;
collectgarbage();
end);
str="POST /ml/index.php HTTP/1.1\r\nHost: "..serverip.."\r\nConnection: close\r\nContent-Length: "..check.."\r\nContent-Type: application/x-www-form-urlencoded\r\nAccept: */*\r\n\r\ndata=";
conn:on("sent",function(conn,c)
if(length>0)then
conn:send(data)
length=length-1
end
end);
conn:on("connection", function(conn,c)
print('Conneted!')
conn:send(str);
end);
conn:connect(port,serverip);
With this method I am getting bout 8-10KBps. Which is too low. Or Is there something wrong about the method I am using?