File tree Expand file tree Collapse file tree
wgpu-remote/src/transport Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11//! Transports based on Unix facilities.
2+
3+ /// A [`Sender`] implementation based on mmap and Unix domain sockets.
4+ ///
5+ /// This type implements [`transport::Sender`] based on a Unix domain socket
6+ /// connection to the counterpart that you supply. It uses the [`memfd_create`]
7+ /// system call to create shared memory segments, and then uses [AF_UNIX]'s
8+ /// `SCM_RIGHTS` ancillary message to pass those file descriptors across the
9+ /// socket to the counterpart.
10+ ///
11+ /// [`transport::Sender`]: crate::transport::Sender
12+ /// [`memfd_create`]: https://man7.org/linux/man-pages/man2/memfd_create.2.html
13+ /// [AF_UNIX]: https://man7.org/linux/man-pages/man7/unix.7.html
14+ struct Sender {
15+ /// The connection to the counterpart.
16+ socket : std:: os:: fd:: OwnedFd ,
17+
18+ /// The id of the next shared memory segment we'll allocate.
19+ next_shmem_id : std:: sync:: AtomicUsize ,
20+ }
21+
You can’t perform that action at this time.
0 commit comments