- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for DelegatingSocketFactory (0.47 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSocketFactory.kt
import java.net.Socket import javax.net.SocketFactory /** * A [SocketFactory] that delegates calls. Sockets can be configured after creation by * overriding [.configureSocket]. */ open class DelegatingSocketFactory(private val delegate: SocketFactory) : SocketFactory() { @Throws(IOException::class) override fun createSocket(): Socket { val socket = delegate.createSocket() return configureSocket(socket) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
import java.net.ServerSocket import java.net.Socket import java.net.SocketException import java.util.concurrent.TimeUnit import kotlin.test.assertFailsWith import okhttp3.DelegatingServerSocketFactory import okhttp3.DelegatingSocketFactory import okhttp3.OkHttpClient import okhttp3.OkHttpClientTestRule import okhttp3.Request import okhttp3.RequestBody import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/SpecificHostSocketFactory.kt
/** * A [SocketFactory] that redirects connections to [defaultAddress] or specific overridden address via [set]. */ class SpecificHostSocketFactory( val defaultAddress: InetSocketAddress?, ) : DelegatingSocketFactory(getDefault()) { private val hostMapping = mutableMapOf<InetAddress, InetSocketAddress>() /** Sets the [real] address for [requested]. */ operator fun set( requested: InetAddress,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt
import okhttp3.CallEvent.ConnectionReleased import okhttp3.CallEvent.RequestFailed import okhttp3.CallEvent.ResponseFailed import okhttp3.DelegatingServerSocketFactory import okhttp3.DelegatingSocketFactory import okhttp3.MediaType import okhttp3.OkHttpClient import okhttp3.OkHttpClientTestRule import okhttp3.Protocol.HTTP_1_1 import okhttp3.RecordingEventListener import okhttp3.Request import okhttp3.RequestBody
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 9.9K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
enableTls() server.enqueue(MockResponse(body = "abc")) val sslSocketFactory = client.sslSocketFactory val trustManager = client.x509TrustManager!! val delegatingSocketFactory = object : DelegatingSSLSocketFactory(sslSocketFactory) { override fun configureSocket(sslSocket: SSLSocket): SSLSocket { return object : DelegatingSSLSocket(sslSocket) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 27K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/FastFallbackTest.kt
// Yield the first IP address so the second IP address completes first. val firstConnectLatch = CountDownLatch(1) val socketFactory = object : DelegatingSocketFactory(SocketFactory.getDefault()) { var first = true override fun createSocket(): Socket { if (first) { first = false firstConnectLatch.await() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
serverSocket.receiveBufferSize = socketBufferSize return serverSocket } } client = client.newBuilder() .socketFactory( object : DelegatingSocketFactory(getDefault()) { override fun configureSocket(socket: Socket): Socket { socket.receiveBufferSize = socketBufferSize socket.sendBufferSize = socketBufferSize
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 131.7K bytes - Viewed (0)