addEventListener

abstract fun addEventListener(eventListener: EventListener)

Configure this call to publish all future events to eventListener, in addition to the listeners configured by OkHttpClient.Builder.eventListener and other calls to this function.

If this call is later cloned, eventListener will not be notified of its events.

There is no mechanism to remove an event listener. Implementations should instead ignore events that they are not interested in.

See also

for semantics and restrictions on listener implementations.