okhttp / okhttp3 / Connection / socket

socket

abstract fun socket(): Socket

Returns the socket that this connection is using. Returns an SSL socket if this connection is HTTPS. If this is an HTTP/2 connection the socket may be shared by multiple concurrent calls.