Skip to content

Commit d983f0c

Browse files
committed
remove set_linger usage
1 parent 065a2b3 commit d983f0c

3 files changed

Lines changed: 0 additions & 106 deletions

File tree

src/server/connection/associate.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,27 +55,6 @@ impl<S: Default> UdpAssociate<S> {
5555
self.stream.peer_addr()
5656
}
5757

58-
/// Reads the linger duration for this socket by getting the `SO_LINGER` option.
59-
///
60-
/// For more information about this option, see [`set_linger`](#method.set_linger).
61-
#[inline]
62-
pub fn linger(&self) -> std::io::Result<Option<Duration>> {
63-
self.stream.linger()
64-
}
65-
66-
/// Sets the linger duration of this socket by setting the `SO_LINGER` option.
67-
///
68-
/// This option controls the action taken when a stream has unsent messages and the stream is closed. If `SO_LINGER` is set,
69-
/// the system shall block the process until it can transmit the data or until the time expires.
70-
///
71-
/// If `SO_LINGER` is not specified, and the stream is closed, the system handles the call in a way
72-
/// that allows the process to continue as quickly as possible.
73-
#[inline]
74-
pub fn set_linger(&self, dur: Option<Duration>) -> std::io::Result<()> {
75-
#[allow(deprecated)]
76-
self.stream.set_linger(dur)
77-
}
78-
7958
/// Gets the value of the `TCP_NODELAY` option on this socket.
8059
///
8160
/// For more information about this option, see [`set_nodelay`](#method.set_nodelay).

src/server/connection/bind.rs

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -77,27 +77,6 @@ impl Bind<NeedFirstReply> {
7777
self.stream.peer_addr()
7878
}
7979

80-
/// Reads the linger duration for this socket by getting the `SO_LINGER` option.
81-
///
82-
/// For more information about this option, see [`set_linger`](crate::server::connection::Bind::set_linger).
83-
#[inline]
84-
pub fn linger(&self) -> std::io::Result<Option<Duration>> {
85-
self.stream.linger()
86-
}
87-
88-
/// Sets the linger duration of this socket by setting the `SO_LINGER` option.
89-
///
90-
/// This option controls the action taken when a stream has unsent messages and the stream is closed.
91-
/// If `SO_LINGER` is set, the system shall block the process until it can transmit the data or until the time expires.
92-
///
93-
/// If `SO_LINGER` is not specified, and the stream is closed, the system handles the call in a way
94-
/// that allows the process to continue as quickly as possible.
95-
#[inline]
96-
pub fn set_linger(&self, dur: Option<Duration>) -> std::io::Result<()> {
97-
#[allow(deprecated)]
98-
self.stream.set_linger(dur)
99-
}
100-
10180
/// Gets the value of the `TCP_NODELAY` option on this socket.
10281
///
10382
/// For more information about this option, see [`set_nodelay`](crate::server::connection::Bind::set_nodelay).
@@ -170,27 +149,6 @@ impl Bind<NeedSecondReply> {
170149
self.stream.peer_addr()
171150
}
172151

173-
/// Reads the linger duration for this socket by getting the `SO_LINGER` option.
174-
///
175-
/// For more information about this option, see [`set_linger`](crate::server::connection::Bind::set_linger).
176-
#[inline]
177-
pub fn linger(&self) -> std::io::Result<Option<Duration>> {
178-
self.stream.linger()
179-
}
180-
181-
/// Sets the linger duration of this socket by setting the `SO_LINGER` option.
182-
///
183-
/// This option controls the action taken when a stream has unsent messages and the stream is closed.
184-
/// If `SO_LINGER` is set, the system shall block the process until it can transmit the data or until the time expires.
185-
///
186-
/// If `SO_LINGER` is not specified, and the stream is closed, the system handles the call in a way
187-
/// that allows the process to continue as quickly as possible.
188-
#[inline]
189-
pub fn set_linger(&self, dur: Option<Duration>) -> std::io::Result<()> {
190-
#[allow(deprecated)]
191-
self.stream.set_linger(dur)
192-
}
193-
194152
/// Gets the value of the `TCP_NODELAY` option on this socket.
195153
///
196154
/// For more information about this option, see

src/server/connection/mod.rs

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,6 @@ impl<O: 'static> IncomingConnection<O> {
4141
self.stream.shutdown().await
4242
}
4343

44-
/// Reads the linger duration for this socket by getting the `SO_LINGER` option.
45-
///
46-
/// For more information about this option, see [`set_linger`](crate::server::connection::IncomingConnection::set_linger).
47-
#[inline]
48-
pub fn linger(&self) -> std::io::Result<Option<Duration>> {
49-
self.stream.linger()
50-
}
51-
52-
/// Sets the linger duration of this socket by setting the `SO_LINGER` option.
53-
///
54-
/// This option controls the action taken when a stream has unsent messages and the stream is closed.
55-
/// If `SO_LINGER` is set, the system shall block the process until it can transmit the data or until the time expires.
56-
///
57-
/// If `SO_LINGER` is not specified, and the stream is closed, the system handles the call in a way
58-
/// that allows the process to continue as quickly as possible.
59-
#[inline]
60-
pub fn set_linger(&self, dur: Option<Duration>) -> std::io::Result<()> {
61-
#[allow(deprecated)]
62-
self.stream.set_linger(dur)
63-
}
64-
6544
/// Gets the value of the `TCP_NODELAY` option on this socket.
6645
///
6746
/// For more information about this option, see
@@ -196,28 +175,6 @@ impl Authenticated {
196175
self.0.peer_addr()
197176
}
198177

199-
/// Reads the linger duration for this socket by getting the `SO_LINGER` option.
200-
///
201-
/// For more information about this option, see
202-
/// [`set_linger`](crate::server::connection::Authenticated::set_linger).
203-
#[inline]
204-
pub fn linger(&self) -> std::io::Result<Option<Duration>> {
205-
self.0.linger()
206-
}
207-
208-
/// Sets the linger duration of this socket by setting the `SO_LINGER` option.
209-
///
210-
/// This option controls the action taken when a stream has unsent messages and the stream is closed.
211-
/// If `SO_LINGER` is set, the system shall block the process until it can transmit the data or until the time expires.
212-
///
213-
/// If `SO_LINGER` is not specified, and the stream is closed, the system handles the call in a way
214-
/// that allows the process to continue as quickly as possible.
215-
#[inline]
216-
pub fn set_linger(&self, dur: Option<Duration>) -> std::io::Result<()> {
217-
#[allow(deprecated)]
218-
self.0.set_linger(dur)
219-
}
220-
221178
/// Gets the value of the `TCP_NODELAY` option on this socket.
222179
///
223180
/// For more information about this option, see

0 commit comments

Comments
 (0)