mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 17:33:23 +00:00
Set keepalive and tcp_nodelay on underlying sockets
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
8b07a68e9e
commit
58cf8ea681
@ -1,6 +1,9 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use aster_bigtcp::{socket::ConnectState, wire::IpEndpoint};
|
||||
use aster_bigtcp::{
|
||||
socket::{ConnectState, RawTcpSetOption},
|
||||
wire::IpEndpoint,
|
||||
};
|
||||
|
||||
use super::{connected::ConnectedStream, init::InitStream};
|
||||
use crate::{
|
||||
@ -83,4 +86,11 @@ impl ConnectingStream {
|
||||
pub(super) fn check_io_events(&self) -> IoEvents {
|
||||
IoEvents::empty()
|
||||
}
|
||||
|
||||
pub(super) fn set_raw_option<R>(
|
||||
&mut self,
|
||||
set_option: impl Fn(&mut dyn RawTcpSetOption) -> R,
|
||||
) -> R {
|
||||
set_option(&mut self.bound_socket)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user