| View previous topic :: View next topic |
| Author |
Message |
aserto
Joined: 17 Apr 2006 Posts: 22
|
Posted: Fri Jun 02, 2006 10:11 pm Post subject: Speed up file transfers |
|
|
I'm writing an irc client. I'have just added the dcc support. But the file transfer is very slow... here is the code:
| Code: |
while true do
--if string.len(buffer)>0 then
buffer = dcc:recv()
rbytes=rbytes+string.len(buffer)
file=io.open(conf.downdir..garg[3], "a")
if not file then
table.insert(chattext[tabnum], "* Error: DCC RECV failed.")
dcc:close()
break
end
file:write(buffer)
file:close()
if finished==true then
System.sleep(100)
dcc:close()
table.insert(chattext[tabnum], "* DCC RECV completed.")
break
end
if rbytes==tonumber(garg[5]) then
--send finished
finished=true
--dcc:close()
--break
end
--end
end
|
Any suggestions to speed up this? |
|
| Back to top |
|
 |
puffo83
Joined: 02 Jun 2006 Posts: 4
|
|
| Back to top |
|
 |
|