Skip to content

improve test/example program handling of auto_sm addresses #308

@carns

Description

@carns

If the auto_sm option is enabled, then Mercury advertises addresses in the form of uid://NUMBER#na+sm://NUMBER#TRUE_TRANSPORT://TRUE_ADDRESS, where the uid: and na+sm: are extra information added on to the true address to help identify and connect to local processes.

Several of the margo example clients and test program clients attempt to automatically detect which transport to initialize to connect to a given server by parsing out the first protocol that appears before the : delimiter. In the above case this will cause it to try to use the uid string as an initializer, which will not work.

If we want to continue doing protocol auto-detection in these clients, we need a shared helper function that will parse out the true transport to use. If multiple addresses are provided (delimited by #), then we need to pick whichever one is not uid or na+sm; falling back to na+sm only if no other options are available.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions