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

feat: enable tcp base protocol listen on same port #382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

driftluo
Copy link
Collaborator

@driftluo driftluo commented Nov 27, 2024

In the original implementation, TCP/WS/TLS could not be listened on the same port. After this PR, these protocols can be listened on the same port.

@driftluo driftluo force-pushed the enable-tcp-base-protocol-listen-on-same-port branch from cc989a7 to 6721eb8 Compare November 27, 2024 12:33
@driftluo driftluo force-pushed the enable-tcp-base-protocol-listen-on-same-port branch from 6721eb8 to 25607f8 Compare November 27, 2024 13:15
@@ -93,24 +95,36 @@ pub fn find_type(addr: &Multiaddr) -> TransportType {
.unwrap_or(TransportType::Tcp)
}

pub(crate) fn parse_tls_domain_name(addr: &Multiaddr) -> Option<String> {
let mut iter = addr.iter();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think mut is unnecessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find_map need it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants