Is there any way to be notified / have your Cocoa application listen for changes in the network connection (disconnect, connect, etc.)? How does something like HardwareGrowler do it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
After looking at the source code for HardwareGrowler (found under
/Extrasin the source code for Growl, I figure that the easiest way would be to use theNetworkNotifier.mclass and change all calls toAppDelegatefunctions to whatever callbacks you want executed when the network connection changes (and give them credit for their code!).