• Kenton Varda's avatar
    Extend AsyncCapabilityStream to support sending FDs with a message. · 65b4f247
    Kenton Varda authored
    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.
    65b4f247
async-io.c++ 76.2 KB