changed design for p2p generic socket
authorJoey Hess <joeyh@joeyh.name>
Thu, 31 Jul 2025 17:18:30 +0000 (13:18 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 31 Jul 2025 17:18:30 +0000 (13:18 -0400)
commit7643c716cd8fe299208961f586c48fb11e23d8a4
tree837f4728c933bd0ced93f7b7798a62515bfbb630
parent86e9e88530c98c4fffcb616fbb7502024f6b6106
changed design for p2p generic socket

Having the git-annex-p2p-<netname> command output the socket filename
left git-annex scrambling to listen to it in order to not miss incoming
connections. And if the command uses something like socat UNIX-CONNECT,
that expects the socket to be accepting connections and errors out when
it's not, that would be a problem.

Rather than complicating the protocol with git-annex needing to send
back a message when it's listening to the socket, simplified it by
having git-annex provide the socket path to the command.

This does mean that, if a P2P network has its own place it expects to
find a socket file, the git-annex-p2p-<netname> command would need to
somehow arrange for it to use the git-annex socket path. A symlink would
be one way to handle that situation.
doc/design/generic_p2p_transport.mdwn