Repository navigation
v0.5.1
A patch release: four fixes, one flag, and a note when a newer bitbang
exists. Nothing changes about how you start a listener, and 0.5.0 command
lines keep working.
All but one of these came from @lars18th, who has been running 0.5.0
against real hardware and writing up what he found.
The file browser offered uploads it could not do
Without -files-upload the file browser still showed an Upload button, a
drop target, and a "drop files here" hint. The listener refused the POST
either way -- api/upload answers 404 unless uploads are on, so nothing
was ever writable -- but you could pick a file and get nothing back
explaining why.
The button, the drag-and-drop, and the hint now appear only when the
listener accepts uploads. They start hidden and appear once the page hears
back, so a slow answer shows no button rather than a button that does not
work. (#37)
Leaving an interactive shell took five seconds
Typing exit in a shell session left the connector sitting there for
five seconds before it quit. Every session, regardless of how much output
there was.
Before sending the exit frame the listener waits for the shell's output to
end, so that nothing written just before exit is cut off. In PTY mode that
wait could never finish: the listener holds the pseudo-terminal's slave
end open for the terminal's lifetime, so a read on the master side never
ends no matter how long ago the shell exited. Every session ran the
five-second timeout down and was then cancelled.
The slave end is now closed once the process has gone, which is what lets
the read finish on its own. The last of the output and the exit code still
arrive.
Measured on one machine, five runs each, the same shell doing the same
thing: 5005ms before, 2.7ms after. The old figure was the timeout plus
about four milliseconds of real work, so what went away was the waiting
and nothing else. (#31)
cp takes a saved device name
connect nas worked and cp nas:/file . did not -- cp could write no
device-table entry and could not read one either. Now it reads:
bitbang connect <url> -name nas # save it once
bitbang cp nas:/photos/x.jpg . # then use the name
bitbang cp ./report.pdf nas:/inbox/
Same case-insensitive lookup connect uses. Anything that is not a saved
name is read exactly as before. (#32)
-noqr
bitbang serve -noqr
Prints the banner, the version, and the URL, and no QR code. The QR was
printed to pipes and log files as well as terminals, and the whole startup
block is reprinted on every reconnect, so a listener running as a daemon
on a flaky network accumulated them in its journal. (#34)
A newer bitbang says so
A listener has been told about a new release since 0.5.0, in the reply to
a registration it was already making. Connectors were not: connect and
cp had no equivalent message to carry it, so they never mentioned an
update however old they were.
The client half is in 0.5.1. It works on the same terms the listener's
does: the signaling server states the same table to everyone as the
connection opens, the client sends nothing -- not its version, not what it
is, not an extra request -- and decides locally whether it has anything to
say. The notice goes to stderr, so bitbang cp <url>:/file - still writes
only the file to stdout.
It needs the matching signaling server to say anything at all, and that is
a separate deploy -- ours and yours both. Against a server without it,
connectors stay quiet, which is what they did before.