Skip to content

Commit 863ca22

Browse files
committed
Update return types.
1 parent 18b3f76 commit 863ca22

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/io/sendmsg_zc.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@ impl Op<SendMsgZc, MultiCQEFuture> {
3434
}
3535

3636
impl Completable for SendMsgZc {
37-
type Output = io::Result<usize>;
37+
//type Output = io::Result<usize>;
3838

39-
fn complete(self, cqe: CqeResult) -> Self::Output {
39+
fn complete(self, cqe: CqeResult) -> (libc::msghdr, io::Result<usize>) {
4040
// Convert the operation result to `usize`
4141
let res = cqe.result.map(|v| v as usize);
42+
43+
let msghdr = self.msghdr;
4244

43-
res
45+
(msghdr, res)
4446
}
4547
}
4648

src/io/socket.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl Socket {
147147
op.await
148148
}
149149

150-
pub(crate) async fn sendmsg_zc(&self, msghdr: &libc::msghdr) -> io::Result<usize> {
150+
pub(crate) async fn sendmsg_zc(&self, msghdr: &libc::msghdr) -> (libc::msghdr, io::Result<usize>) {
151151
let op = Op::sendmsg_zc(&self.fd, msghdr).unwrap();
152152
op.await
153153
}

src/net/udp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl UdpSocket {
220220
self.inner.send_zc(buf).await
221221
}
222222

223-
pub async fn sendmsg_zc(&self, msghdr: &libc::msghdr) -> io::Result<usize> {
223+
pub async fn sendmsg_zc(&self, msghdr: &libc::msghdr) -> (libc::msghdr, io::Result<usize>) {
224224
self.inner.sendmsg_zc(msghdr).await
225225
}
226226

0 commit comments

Comments
 (0)