diff
c1edf992f9
Missed a spot in the net/http docs. Calling Server.Shutdown() causes ListenAndServe to return *immediately*, and when it does main() exits and the "Upload Success" message gets cut off before it can be fully sent, which spooks HTTP clients a bit. To avoid that, you have to wait for the call to Server.Shutdown() to return, and then signal back to main() that it's now safe to exit. |
||
---|---|---|
.gitignore | ||
README.md | ||
go.mod | ||
go.sum | ||
main.go |
README.md
Ruff provides a pop-up web server to Retrieve/Upload Files Fast over LAN, inspired by WOOF (Web Offer One File) by Simon Budig.
It's based on the idea that not every device has , but just about every device that can network has an HTTP client, making a hyper-simple HTTP server a viable option for file transfer with zero notice or setup as long as somebody has a copy of RUFF.
Why create RUFF when WOOF exists? WOOF is no longer in the debian repos and
it's easier to go get
a tool than it is to hunt down Simon's website for
the latest copy.
Installation
go get git.tilde.town/diff/ruff
Usage
Assuming $GOPATH is in $PATH:
ruff "cool thing.jpg" # to send a cool file
and
ruff -u # to receive a cool file