We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ae3ab1 commit 2708e3dCopy full SHA for 2708e3d
netwatch/src/udp.rs
@@ -447,7 +447,7 @@ impl UdpSocket {
447
448
/// Creates a [`UdpSender`] sender.
449
pub fn create_sender(self: Arc<Self>) -> UdpSender {
450
- UdpSender::new(self.clone())
+ UdpSender::new(self)
451
}
452
453
/// Whether transmitted datagrams might get fragmented by the IP layer
@@ -863,6 +863,12 @@ pin_project_lite::pin_project! {
863
864
865
866
+impl Clone for UdpSender {
867
+ fn clone(&self) -> Self {
868
+ self.socket.clone().create_sender()
869
+ }
870
+}
871
+
872
impl std::fmt::Debug for UdpSender {
873
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
874
f.write_str("UdpSender")
0 commit comments