UX strategies for handling unstable connections

I have an app that is 100% online. When the user goes offline due to a bad network connection, I want to handle it properly on the interface.

What strategies do you guys recommend for this situation? Show a small warning? Show an alert dialog? A modal?

Thank you.

A standard solution, at least from the iOS point of the view is to use a modal window. Thou, depending on your application you can even use local notifications.