File: socket2-0.5.patch

package info (click to toggle)
rust-tokio 1.49.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,492 kB
  • sloc: makefile: 2
file content (142 lines) | stat: -rw-r--r-- 3,961 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
diff --git a/Cargo.toml b/Cargo.toml
index b312d14..52d7139 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -832,7 +832,7 @@ optional = true
 version = "0.9"
 
 [target.'cfg(not(target_family = "wasm"))'.dependencies.socket2]
-version = "0.6.0"
+version = "0.5.0"
 features = ["all"]
 optional = true
 
@@ -840,7 +840,7 @@ optional = true
 version = "1"
 
 [target.'cfg(not(target_family = "wasm"))'.dev-dependencies.socket2]
-version = "0.6.0"
+version = "0.5.0"
 
 [target.'cfg(not(target_family = "wasm"))'.dev-dependencies.tempfile]
 version = "3.1.0"
diff --git a/src/net/tcp/socket.rs b/src/net/tcp/socket.rs
index 43c5011..8aee94f 100644
--- a/src/net/tcp/socket.rs
+++ b/src/net/tcp/socket.rs
@@ -464,7 +464,7 @@ impl TcpSocket {
     /// # }
     /// ```
     pub fn set_nodelay(&self, nodelay: bool) -> io::Result<()> {
-        self.inner.set_tcp_nodelay(nodelay)
+        self.inner.set_nodelay(nodelay)
     }
 
     /// Gets the value of the `TCP_NODELAY` option on this socket.
@@ -486,7 +486,7 @@ impl TcpSocket {
     /// # }
     /// ```
     pub fn nodelay(&self) -> io::Result<bool> {
-        self.inner.tcp_nodelay()
+        self.inner.nodelay()
     }
 
     /// Gets the value of the `IPV6_TCLASS` option for this socket.
@@ -586,7 +586,7 @@ impl TcpSocket {
         ))))
     )]
     pub fn tos_v4(&self) -> io::Result<u32> {
-        self.inner.tos_v4()
+        self.inner.tos()
     }
 
     /// Deprecated. Use [`tos_v4()`] instead.
@@ -614,7 +614,7 @@ impl TcpSocket {
         ))))
     )]
     pub fn tos(&self) -> io::Result<u32> {
-        self.tos_v4()
+        self.tos()
     }
 
     /// Sets the value for the `IP_TOS` option on this socket.
@@ -646,7 +646,7 @@ impl TcpSocket {
         ))))
     )]
     pub fn set_tos_v4(&self, tos: u32) -> io::Result<()> {
-        self.inner.set_tos_v4(tos)
+        self.inner.set_tos(tos)
     }
 
     /// Deprecated. Use [`set_tos_v4()`] instead.
@@ -674,7 +674,7 @@ impl TcpSocket {
         ))))
     )]
     pub fn set_tos(&self, tos: u32) -> io::Result<()> {
-        self.set_tos_v4(tos)
+        self.set_tos(tos)
     }
 
     /// Gets the value for the `SO_BINDTODEVICE` option on this socket
diff --git a/src/net/tcp/stream.rs b/src/net/tcp/stream.rs
index 33b1571..e025f9f 100644
--- a/src/net/tcp/stream.rs
+++ b/src/net/tcp/stream.rs
@@ -1209,7 +1209,7 @@ impl TcpStream {
         )))
     )]
     pub fn quickack(&self) -> io::Result<bool> {
-        socket2::SockRef::from(self).tcp_quickack()
+        socket2::SockRef::from(self).quickack()
     }
 
     /// Enable or disable `TCP_QUICKACK`.
@@ -1249,7 +1249,7 @@ impl TcpStream {
         )))
     )]
     pub fn set_quickack(&self, quickack: bool) -> io::Result<()> {
-        socket2::SockRef::from(self).set_tcp_quickack(quickack)
+        socket2::SockRef::from(self).set_quickack(quickack)
     }
 
     cfg_not_wasi! {
diff --git a/src/net/udp.rs b/src/net/udp.rs
index a858dad..ee73733 100644
--- a/src/net/udp.rs
+++ b/src/net/udp.rs
@@ -2097,7 +2097,7 @@ impl UdpSocket {
         ))))
     )]
     pub fn tos_v4(&self) -> io::Result<u32> {
-        self.as_socket().tos_v4()
+        self.as_socket().tos()
     }
 
     /// Deprecated. Use [`tos_v4()`] instead.
@@ -2125,7 +2125,7 @@ impl UdpSocket {
         ))))
     )]
     pub fn tos(&self) -> io::Result<u32> {
-        self.tos_v4()
+        self.tos()
     }
 
     /// Sets the value for the `IP_TOS` option on this socket.
@@ -2157,7 +2157,7 @@ impl UdpSocket {
         ))))
     )]
     pub fn set_tos_v4(&self, tos: u32) -> io::Result<()> {
-        self.as_socket().set_tos_v4(tos)
+        self.as_socket().set_tos(tos)
     }
 
     /// Deprecated. Use [`set_tos_v4()`] instead.
@@ -2185,7 +2185,7 @@ impl UdpSocket {
         ))))
     )]
     pub fn set_tos(&self, tos: u32) -> io::Result<()> {
-        self.set_tos_v4(tos)
+        self.set_tos(tos)
     }
 
     /// Gets the value for the `SO_BINDTODEVICE` option on this socket