Extend AsyncCapabilityStream to support sending FDs with a message.
Previously, FDs could only be sent separately from data, with the underlying implementation actually sending a dummy one-byte message. For Cap'n Proto FD passing, it's better if we can attach the FDs to the RPC message they arrived with, because it avoids the need to pre-negotiate where FD passing is supported: if the sender sends FDs but the recipient doesn't arrange to receive them, the FDs will be discarded and closed automatically by the OS. Whereas, if we are sending separate one-byte messages, the recipient needs to know what to do with those.
Showing
This diff is collapsed.
Please
register
or
sign in
to comment