ConnectionListener

Listener for connection events. Extend this class to monitor the new connections and closes.

All event methods must execute fast, without external locking, cannot throw exceptions, attempt to mutate the event parameters, or be reentrant back into the client. Any IO - writing to files or network should be done asynchronously.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard

Functions

Link copied to clipboard
open fun connectEnd(connection: Connection, route: Route, call: Call)

Invoked as soon as a connection is successfully established.

Link copied to clipboard
open fun connectFailed(route: Route, call: Call, failure: IOException)

Invoked when a connection fails to be established.

Link copied to clipboard
open fun connectionAcquired(connection: Connection, call: Call)

Invoked when a call is assigned a particular connection.

Link copied to clipboard
open fun connectionClosed(connection: Connection)

Invoked when a connection is released as no longer required.

Link copied to clipboard
open fun connectionReleased(connection: Connection, call: Call)

Invoked when a call no longer uses a connection.

Link copied to clipboard
open fun connectStart(route: Route, call: Call)

Invoked as soon as a call causes a connection to be started.

Link copied to clipboard
open fun noNewExchanges(connection: Connection)

Invoked when a connection is marked for no new exchanges.