Hello all! (this is my first time posting here in the forums)
I'm not sure how to use LuaSocket to transfer files from one PC to another. I have read and and do understand this tutorial on UDP:
But it only supports the passing of strings.
Any help or advice is much appreciated.
EDIT: I found the answer... I can convert all of the files to strings using love.filesystem.read and send that using LuaSocket's UDP and then on the other computer convert that back to a file and save it using love.filesystem.write.
[Solved] Moving Files From compter to computer using UDP?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Moving Files From compter to computer using LuaSocket?
You might want to use TCP rather than UDP, because it is reliable. You probably don't want your files to be missing pieces or otherwise be messed up. UDP is for situations where old information = bad information, like in multiplayer FPSes.
Help us help you: attach a .love.
Re: Moving Files From compter to computer using LuaSocket?
TCP is one thing, the other this is that default chunk/packet size is 8 KB, so you have to split your string into pieces, send each piece and then put them back together. not so simple...
Re: Moving Files From compter to computer using LuaSocket?
Hmmmm... Do you know a good tutorial on using TCP?
My Tox ID: 0F1FB9170B94694A90FBCF6C4DDBDB9F58A9E4CDD0B4267E50BF9CDD62A0F947E376C5482610
Who is online
Users browsing this forum: pgimeno and 3 guests