File tree Expand file tree Collapse file tree 3 files changed +1
-9
lines changed Expand file tree Collapse file tree 3 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -390,7 +390,7 @@ impl Socket {
390
390
/// On success, returns the number of bytes peeked and the address from
391
391
/// whence the data came.
392
392
pub fn peek_from ( & self , buf : & mut [ u8 ] ) -> io:: Result < ( usize , SockAddr ) > {
393
- self . inner ( ) . peek_from ( buf)
393
+ self . recv_from_with_flags ( buf, sys :: MSG_PEEK )
394
394
}
395
395
396
396
/// Sends data on the socket to a connected peer.
Original file line number Diff line number Diff line change @@ -578,10 +578,6 @@ pub struct Socket {
578
578
}
579
579
580
580
impl Socket {
581
- pub fn peek_from ( & self , buf : & mut [ u8 ] ) -> io:: Result < ( usize , SockAddr ) > {
582
- recv_from ( self . fd , buf, libc:: MSG_PEEK )
583
- }
584
-
585
581
#[ cfg( not( target_os = "redox" ) ) ]
586
582
pub fn recv_from_vectored (
587
583
& self ,
Original file line number Diff line number Diff line change @@ -414,10 +414,6 @@ pub struct Socket {
414
414
}
415
415
416
416
impl Socket {
417
- pub fn peek_from ( & self , buf : & mut [ u8 ] ) -> io:: Result < ( usize , SockAddr ) > {
418
- recv_from ( self . socket , buf, MSG_PEEK )
419
- }
420
-
421
417
pub fn recv_from_vectored (
422
418
& self ,
423
419
bufs : & mut [ IoSliceMut < ' _ > ] ,
You can’t perform that action at this time.
0 commit comments