(
&mut self,
ms: u64,
)
| 147 | |
| 148 | #[inline] |
| 149 | pub async fn next_timeout( |
| 150 | &mut self, |
| 151 | ms: u64, |
| 152 | ) -> Option<ResultType<(BytesMut, TargetAddr<'static>)>> { |
| 153 | if let Ok(res) = |
| 154 | tokio::time::timeout(std::time::Duration::from_millis(ms), self.next()).await |
| 155 | { |
| 156 | res |
| 157 | } else { |
| 158 | None |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | pub fn local_addr(&self) -> Option<SocketAddr> { |
| 163 | if let FramedSocket::Direct(x) = self { |