-
Notifications
You must be signed in to change notification settings - Fork 2
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
split bind and listen for dynamic port reading #29
Conversation
router2.bind().await?; | ||
router2.listen().await?; | ||
Ok(()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bind now returns the ip/port and later call to listen() must be made to actually listen. This way implementers of router (such as read shard) are able to know the port they are listening on while still supporting dynamic port assignment.
let client3 = info_server.get_router_client(); | ||
let client4 = info_server.get_router_client(); | ||
let router_clone_3 = Arc::clone(&info_router); | ||
let client3 = read_shard_server.get_router_client(); | ||
let client4 = read_shard_server.get_router_client(); | ||
let router_clone_3 = read_shard_router.clone(); | ||
tokio::spawn({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a typo in read_shard
let read_shard = ReadShard::new(SocketAddrV6::new(Ipv6Addr::LOCALHOST, 8084, 0, 0)); | ||
let read_shard = ReadShard::new(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is now no longer needed
No description provided.