layerhq/okhttp — pull request #4 by dcheckoway (2014-10-16 02:10:52+00:00)
Title: Add optional connection closed callback hooks

IMPORTANT: this depends on https://github.com/layerhq/okio/pull/1 and the custom `0.9.0-LAYER` version of okio.

The changes in this PR allow us to do the following:
```java
SpdyConnection.setConnectionObserver(new ConnectionObserver() {
public void onConnectionClosed(Connection connection) {
// handle this however you see fit
}
}
```

NOTE: This is static (global) and really ugly, but it should work.