diff options
| author | diogo464 <[email protected]> | 2025-12-06 15:05:48 +0000 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-12-06 15:06:44 +0000 |
| commit | 077b4c04d1eba229d2bdd42952f5617966c6b3fe (patch) | |
| tree | edce665979c90dabe61f96e1769c1bd63d96ab25 /src/entity_sensor.rs | |
| parent | 3a974cec36cd8a48992e05629325d8279cf289b7 (diff) | |
Implement connect_and_run helper function
Added a convenience function to handle connection lifecycle with automatic reconnection. The function supports:
- Parsing addresses as IP:port, IP with default port (1883), or hostname with DNS resolution
- Filtering DNS results for IPv4 addresses only
- Automatic reconnection with 5-second delay on failures
- Comprehensive error logging for DNS, TCP, and device run failures
- TCP socket timeout of 10 seconds
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Diffstat (limited to 'src/entity_sensor.rs')
0 files changed, 0 insertions, 0 deletions
