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

Introduce ServerId type, use it in MsgSource and MsgTarget #378

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

Conversation

osa1
Copy link
Owner

@osa1 osa1 commented Jan 18, 2022

This will allow connecting to same server multiple times, fixing #374.

I implemented the plan as described in #374 (comment).

This currently does not build -- I need to update the logger crate. I'm not sure how to handle multiple servers with same name and same alias in the logger yet. It's probably best to reject such cases and ask the user to come up with a unique server name, alias pair.

In principle, once we establish the invariant that server name, alias pairs are always unique, we no longer need the ServerId type. In practice though it's easier (and more efficient) to compare integers (ServerId) than string pairs.

So maybe it's best to make sure (server name, alias) are unique (for to logger, TUI doesn't care), but keep the ServerId type.

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.

1 participant