probably you better don't use readline and writeline for filetransfer. instead you should use a little protocol that sends a header including the filesize and the 32bit checksum of the file, so you can check fo rerrors and order the file a 2nd time if required (esp. when in UDP), followed by a bunch of data bytes (probably readbytes).
I think there are several examples of file servers in the code archives, shouldn't be a big deal.
I think there are several examples of file servers in the code archives, shouldn't be a big deal.