}
}
-async fn handle_client_do(mut client: AsyncSeqPacketSocket) -> Result<(), Error> {
+async fn handle_client_do(client: AsyncSeqPacketSocket) -> Result<(), Error> {
let mut msgbuf = lxcseccomp::ProxyMessageBuffer::new(64)
.map_err(|e| format_err!("failed to allocate proxy message buffer: {}", e))?;
}
pub fn recv_fds_vectored(
- &mut self,
+ &self,
iov: &mut [IoVecMut],
num_fds: usize,
) -> io::Result<(usize, Vec<Fd>)> {
///
/// Note that short writes are silently treated as success, since this is a `SOCK_SEQPACKET`,
/// so neither continuing nor repeating a partial messages makes all that much sense.
- pub fn sendmsg_vectored(&mut self, iov: &[IoVec]) -> io::Result<()> {
+ pub fn sendmsg_vectored(&self, iov: &[IoVec]) -> io::Result<()> {
let mut msg: libc::msghdr = unsafe { mem::zeroed() };
msg.msg_iov = iov.as_ptr() as *const libc::iovec as *mut libc::iovec;
msg.msg_iovlen = iov.len();
}
pub fn poll_recv_fds_vectored(
- &mut self,
+ &self,
iov: &mut [IoVecMut],
num_fds: usize,
cx: &mut Context,
}
pub async fn recv_fds_vectored(
- &mut self,
+ &self,
iov: &mut [IoVecMut<'_>],
num_fds: usize,
) -> io::Result<(usize, Vec<Fd>)> {
}
pub fn poll_sendmsg_vectored(
- &mut self,
+ &self,
data: &[IoVec],
cx: &mut Context,
) -> Poll<io::Result<()>> {
}
}
- pub async fn sendmsg_vectored(&mut self, data: &[IoVec<'_>]) -> io::Result<()> {
+ pub async fn sendmsg_vectored(&self, data: &[IoVec<'_>]) -> io::Result<()> {
poll_fn(move |cx| self.poll_sendmsg_vectored(data, cx)).await
}
}