Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[inetstack] Enhancement: Remove circular dependencies #1464

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/rust/inetstack/protocols/layer4/tcp/active_open.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::{
constants::{FALLBACK_MSS, MAX_WINDOW_SCALE},
established::{
congestion_control::{self, CongestionControl},
EstablishedSocket,
SharedEstablishedSocket,
},
header::{TcpHeader, TcpOptions2},
SeqNumber,
Expand Down Expand Up @@ -91,7 +91,7 @@ impl SharedActiveOpenSocket {
})))
}

fn process_ack(&mut self, header: TcpHeader) -> Result<EstablishedSocket, Fail> {
fn process_ack(&mut self, header: TcpHeader) -> Result<SharedEstablishedSocket, Fail> {
let expected_seq: SeqNumber = self.local_isn + SeqNumber::from(1);

// Bail if we didn't receive a ACK packet with the right sequence number.
Expand Down Expand Up @@ -191,7 +191,7 @@ impl SharedActiveOpenSocket {
"Window scale: local {}, remote {}",
local_window_scale, remote_window_scale
);
Ok(EstablishedSocket::new(
Ok(SharedEstablishedSocket::new(
self.local,
self.remote,
self.runtime.clone(),
Expand All @@ -212,7 +212,7 @@ impl SharedActiveOpenSocket {
)?)
}

pub async fn connect(mut self) -> Result<EstablishedSocket, Fail> {
pub async fn connect(mut self) -> Result<SharedEstablishedSocket, Fail> {
// Start connection handshake.
let handshake_retries: usize = self.tcp_config.get_handshake_retries();
let handshake_timeout = self.tcp_config.get_handshake_timeout();
Expand Down
Loading
Loading