| Index: mojo/embedder/platform_channel_utils_posix.h
|
| diff --git a/mojo/embedder/platform_channel_utils_posix.h b/mojo/embedder/platform_channel_utils_posix.h
|
| index 5146ce5df238509db0290223a7b14506053f80ca..6d0ffcd2de595c707a5e7ff243fb2f0611a16241 100644
|
| --- a/mojo/embedder/platform_channel_utils_posix.h
|
| +++ b/mojo/embedder/platform_channel_utils_posix.h
|
| @@ -20,7 +20,7 @@ namespace mojo {
|
| namespace embedder {
|
|
|
| // The maximum number of handles that can be sent "at once" using
|
| -// |PlatformChannelSendHandles()|.
|
| +// |PlatformChannelSendmsgWithHandles()|.
|
| // TODO(vtl): This number is taken from ipc/file_descriptor_set_posix.h:
|
| // |FileDescriptorSet::kMaxDescriptorsPerMessage|. Where does it come from?
|
| const size_t kPlatformChannelMaxNumHandles = 7;
|
| @@ -36,6 +36,23 @@ MOJO_SYSTEM_IMPL_EXPORT ssize_t PlatformChannelWritev(PlatformHandle h,
|
| struct iovec* iov,
|
| size_t num_iov);
|
|
|
| +// Writes data, and the given set of |PlatformHandle|s (i.e., file descriptors)
|
| +// over the Unix domain socket given by |h| (e.g., created using
|
| +// |PlatformChannelPair()|). All the handles must be valid, and there must be at
|
| +// least one and at most |kPlatformChannelMaxNumHandles| handles. The return
|
| +// value is as for |sendmsg()|, namely -1 on failure and otherwise the number of
|
| +// bytes of data sent on success (note that this may not be all the data
|
| +// specified by |iov|). (The handles are not closed, regardless of success or
|
| +// failure.)
|
| +MOJO_SYSTEM_IMPL_EXPORT ssize_t PlatformChannelSendmsgWithHandles(
|
| + PlatformHandle h,
|
| + struct iovec* iov,
|
| + size_t num_iov,
|
| + PlatformHandle* platform_handles,
|
| + size_t num_platform_handles);
|
| +
|
| +// TODO(vtl): Remove this once I've switched things over to
|
| +// |PlatformChannelSendmsgWithHandles()|.
|
| // Sends |PlatformHandle|s (i.e., file descriptors) over the Unix domain socket
|
| // (e.g., created using PlatformChannelPair|). (These will be sent in a single
|
| // message having one null byte of data and one control message header with all
|
|
|