@@ -811,9 +811,9 @@ pub struct SendMmsgData<'a, I, C>
811
811
pub _lt : std:: marker:: PhantomData < & ' a I > ,
812
812
}
813
813
814
- /// An extension of [ `sendmsg`] that allows the caller to transmit multiple
815
- /// messages on a socket using a single system call. ( This has performance
816
- /// benefits for some applications.).
814
+ /// An extension of `sendmsg` that allows the caller to transmit multiple
815
+ /// messages on a socket using a single system call. This has performance
816
+ /// benefits for some applications.
817
817
///
818
818
/// Allocations are performed for cmsgs and to build `msghdr` buffer
819
819
///
@@ -823,11 +823,11 @@ pub struct SendMmsgData<'a, I, C>
823
823
/// * `data`: Struct that implements `IntoIterator` with `SendMmsgData` items
824
824
/// * `flags`: Optional flags passed directly to the operating system.
825
825
///
826
- /// Returns tuple, where the first value is number of sent messages, and the second one
827
- /// it a `Vec` with numbers of bytes sent on each appropriate message.
826
+ /// # Returns
827
+ /// `Vec` with numbers of sent bytes on each sent message.
828
828
///
829
- ///# References
830
- /// [`sendmmsg `](fn.sendmsg.html)
829
+ /// # References
830
+ /// [`sendmsg `](fn.sendmsg.html)
831
831
#[ cfg( any(
832
832
target_os = "linux" ,
833
833
target_os = "android" ,
@@ -839,7 +839,7 @@ pub fn sendmmsg<'a, I, C>(
839
839
fd : RawFd ,
840
840
data : impl std:: iter:: IntoIterator < Item =& ' a SendMmsgData < ' a , I , C > > ,
841
841
flags : MsgFlags
842
- ) -> Result < ( usize , Vec < usize > ) >
842
+ ) -> Result < Vec < usize > >
843
843
where
844
844
I : AsRef < [ IoVec < & ' a [ u8 ] > ] > + ' a ,
845
845
C : AsRef < [ ControlMessage < ' a > ] > + ' a ,
@@ -888,7 +888,7 @@ pub fn sendmmsg<'a, I, C>(
888
888
sent_bytes[ i] = initialized_data[ i] . msg_len as usize ;
889
889
}
890
890
891
- Ok ( ( sent_messages , sent_bytes) )
891
+ Ok ( sent_bytes)
892
892
}
893
893
894
894
@@ -902,11 +902,11 @@ pub struct RecvMmsgData<'a, I>
902
902
pub cmsg_buffer : Option < & ' a mut Vec < u8 > > ,
903
903
}
904
904
905
- /// An extension of [ `recvmsg`] that allows the caller to receive multiple
906
- /// messages from a socket using a single system call. ( This has
907
- /// performance benefits for some applications.)
905
+ /// An extension of `recvmsg` that allows the caller to receive multiple
906
+ /// messages from a socket using a single system call. This has
907
+ /// performance benefits for some applications.
908
908
///
909
- /// `iov` and `cmsg_buffer` should be constucted similarly to recvmsg
909
+ /// `iov` and `cmsg_buffer` should be constructed similarly to ` recvmsg`
910
910
///
911
911
/// Multiple allocations are performed
912
912
///
@@ -922,8 +922,12 @@ pub struct RecvMmsgData<'a, I>
922
922
/// * `cmsg_buffer`: Space to receive ancillary data. Should be created by
923
923
/// [`cmsg_space!`](macro.cmsg_space.html)
924
924
///
925
+ /// # Returns
926
+ /// A `Vec` with multiple `RecvMsg`, one per received message
927
+ ///
925
928
/// # References
926
- /// [`recvmsg`](fn.recvmsg.html)
929
+ /// - [`recvmsg`](fn.recvmsg.html)
930
+ /// - [`RecvMsg`](struct.RecvMsg.html)
927
931
#[ cfg( any(
928
932
target_os = "linux" ,
929
933
target_os = "android" ,
0 commit comments