Browse Source

Merge branch 'master' into feature/v0.8-bump

Ryan Summers 3 năm trước cách đây
mục cha
commit
d08e948407
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      src/socket/dhcpv4.rs

+ 7 - 0
src/socket/dhcpv4.rs

@@ -6,6 +6,7 @@ use crate::wire::{EthernetAddress, IpProtocol, IpAddress,
 use crate::wire::dhcpv4::{field as dhcpv4_field};
 use crate::socket::SocketMeta;
 use crate::time::{Instant, Duration};
+use crate::socket::SocketHandle;
 
 use super::{PollAt, Socket};
 
@@ -420,6 +421,12 @@ impl Dhcpv4Socket {
         }
     }
 
+    /// Return the socket handle.
+    #[inline]
+    pub fn handle(&self) -> SocketHandle {
+        self.meta.handle
+    }
+
     /// Reset state and restart discovery phase.
     ///
     /// Use this to speed up acquisition of an address in a new