okhttp / okhttp3 / EventListener / connectStart

connectStart

open fun connectStart(call: Call, inetSocketAddress: InetSocketAddress, proxy: Proxy): Unit

Invoked just prior to initiating a socket connection.

This method will be invoked if no existing connection in the ConnectionPool can be reused.

This can be invoked more than 1 time for a single Call. For example, if the response to the Call.request is a redirect to a different address, or a connection is retried.