Cross-platform internet reachability addon that raises connected and disconnected events, with platform-specific implementations for Apple, Windows, and others.
README
ofxReachability
Introduction
A cross-platform Internet reachability addon. Register listeners onofxReachability::connectedEvent and ofxReachability::disconnectedEvent and you're good to go.The Apple implementation uses Reachability by Tony Million. Works on Mac and iOS.
The Windows implementation is based on this article by Raymond Chen.
Other platforms use the ping implementation, where I just ping google.com at regular intervals. Specific platform implementations are welcome!
Installation
Drop theofxReachability folder into openFrameworks/addons/.When adding the files to your project, make sure to include the "apple" subfolder on Mac / iOS, and the "win32" subfolder on Windows.
If you're on Mac, you'll also need to add
SystemConfiguration.framework in the linking build phase.
ofxAddons