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

Support for tcp binding to route by port numbers #299

Merged
merged 11 commits into from
Jul 25, 2023

Conversation

lukefallows
Copy link
Contributor

Description

Support for tcp binding to route by port numbers

Fixes #294

…r to handle port values in JSON, and add tests for reading and writing with port values and port ranges
@lukefallows lukefallows marked this pull request as draft July 12, 2023 17:38
@lukefallows lukefallows marked this pull request as ready for review July 19, 2023 18:51
@@ -281,6 +281,7 @@ public NamespaceConfig parse(
catch (Throwable ex)
{
logError(ex.getMessage());
ex.printStackTrace();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this logging.

InetSocketAddress remote)
{
return routes.stream()
.filter(r -> r.matches(remote.getAddress()))
.filter(r -> r.matches(local))
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like we only need one address parameter here, not both local and remote.

Then in TcpServerFactory, we'd need to pass local socket address to match the local port we are listening on, and in TcpClientFactory, we'd need to pass remote socket address to match the remote port we are connecting to, agree?

@@ -84,7 +84,7 @@ public class TcpServerFactory implements TcpStreamFactory

private final ProxyBeginExFW.Builder beginExRW = new ProxyBeginExFW.Builder();

private final EngineContext context;

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the extra blank line.

@@ -280,7 +280,7 @@ public NamespaceConfig parse(
}
catch (Throwable ex)
{
logError(ex.getMessage());

Copy link
Contributor

Choose a reason for hiding this comment

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

Apologies, please restore this line.

@jfallows jfallows merged commit 3496bde into aklivity:develop Jul 25, 2023
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.

Enhance tcp binding to route by port
2 participants