develooper Front page | perl.beginners | Postings from April 2011

Wanted: Help inventing poor man's FTP server

Thread Next
From:
siegfried
Date:
April 10, 2011 11:55
Subject:
Wanted: Help inventing poor man's FTP server
Message ID:
20110410115530.d50bba72719f91cdb61cd892ddf83b25.814e345a8f.wbe@email11.secureserver.net
I want to implement a implement a poor man's ftp server that has minimal
dependencies (like none!). I'll write a simple custom poor man's ftp
client on the other side. Since I'm writing both the client and the
server, I don't need to worry about adherence to the ftp standard --
only the concept.

So how can I write a simple perl program that waits on a TCP socket for
a file name followed by the file contents (I don't need to worry the
path names -- everything goes in the same directory).

Can I assume that an entire perl source code file will fit in a single
socket packet? I've only used print statements before. I could write a
single record per the call to the socket send function. Is there a
better way? (I hope so!)

Recommendations are welcome!

thanks,
siegfried




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About