Files
linuxkit/projects/miragesdk/src/fdd/README.md
Thomas Gazagnaire 56229e486b sdk: add a file-descriptor sharing server
```
$ fdd init &
$ fdd share /tmp/foo # serve a fresh socketpair on that path
$ fdd test /tmp/foo  # read the socketpair and test that it works
```

Instead of `fdd test` (which is only useful for testing), users are expected to
connect to the unix domain socket and call `recvmsg(2)`. They will get one side
of the socketpair. Two different processes can do this and they will be able to
talk to each other.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-06-29 17:53:49 +02:00

577 B

fdd -- file-descriptor daemon

Fdd allows to share socketpair over a unix domain socket. The typical flow is as follows:

  1. Start the fdd daemon:

    $ fdd init
    
  2. Create a bunch of socketpair shares:

    $ fdd share /tmp/foo
    $ fdd share /tmp/bar
    

This will create /tmp/foo and /tmp/bar that process clients can connect too. Once connected, they can use recvmsg1 to receive each side of the socketpair. If two different process do this, they then have a channel to talk to each other.