Skip to content

Commit c54318f

Browse files
committed
chore(socket): add rep socket poll_next_unpin utility
1 parent ebafc3a commit c54318f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

msg-socket/src/rep/socket.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ where
151151
pub fn local_addr(&self) -> Option<&A> {
152152
self.local_addr.as_ref()
153153
}
154+
155+
/// Returns the next request from the socket using an unpinned interface.
156+
pub fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Request<A>>> {
157+
Pin::new(self).poll_next(cx)
158+
}
154159
}
155160

156161
impl<T: Transport<A> + Unpin, A: Address> Stream for RepSocket<T, A> {

0 commit comments

Comments
 (0)