Skip to content

Conversation

@oestrich
Copy link
Contributor

Adds a callback to let the device have a hook for knowing that its connected successfully to nerves hub. This allows sending connection types up the socket after fully connected. Connection types are "ethernet", "wifi", "cellular".

There is a matching PR for Nerves Hub to save this information.

@oestrich oestrich requested review from fhunleth and jjcarstens March 20, 2023 14:48
Copy link
Contributor

@fhunleth fhunleth left a comment

Choose a reason for hiding this comment

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

Are there any concerns about this causing issues with NervesHub servers that don't support the connection type?

@oestrich
Copy link
Contributor Author

It crashes the socket if we send a message like this to NervesHub servers that don't support it. But since you have to call it in your own code, is it fine to leave as a note in the docs for send_connection_types/1? I think we could make NervesHubLink smarter with NervesHub sending capabilities on connect, but it would be a bit of work to make work how we want.

Adds a callback to let the device have a hook for knowing that its
connected successfully to nerves hub. This allows sending connection
types up the socket after fully connected. Connection types are
"ethernet", "wifi", "cellular".
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.

3 participants