Support for resuming dropped connections
As networks are often unreliable, it would be nice to add support for the resuming of broken transport connections. (Resuming cases where a waypipe client has been killed (cleanly, via signint) could be significantly more complicated, due to the need to read/write state from disk.)
One way to handle this would be to create a random session token for each connection; when reconnecting, the main waypipe server instance could use the session token to identify which handler to reawaken and sendmsg an updated connection fd. Unfortunately, it's possible for several transfers to be in flight (and hence vanish) at the same time, so some method of acknowledging transfers would be needed; waypipe's buffer management would also need to be rewritten.
One can also use a transport mechanism which is more reliable than ssh; with standard tools like netcat and socat, one can convert Unix domain sockets to TCP or some other simple data stream. A resumable transport protocol, or one that still works when the connection changes, like MPTCP, would then help avoid dropped connections entirely.