Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for EventListener (0.14 sec)

  1. okhttp/src/main/kotlin/okhttp3/EventListener.kt

         * from this method.**
         */
        fun create(call: Call): EventListener
      }
    
      companion object {
        @JvmField
        val NONE: EventListener =
          object : EventListener() {
          }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 15.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

      val forWebSocket: Boolean,
    ) : Call, Cloneable {
      internal val lock: ReentrantLock = ReentrantLock()
    
      private val connectionPool: RealConnectionPool = client.connectionPool.delegate
    
      internal val eventListener: EventListener = client.eventListenerFactory.create(this)
    
      private val timeout =
        object : AsyncTimeout() {
          override fun timedOut() {
            ******@****.***()
          }
        }.apply {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  3. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        response.use {
          assertEquals(200, response.code)
        }
      }
    
      @Test
      fun testEventListener() {
        val eventListener = RecordingEventListener()
    
        enableTls()
    
        client = client.newBuilder().eventListenerFactory(clientTestRule.wrap(eventListener)).build()
    
        server.enqueue(MockResponse(body = "abc1"))
        server.enqueue(MockResponse(body = "abc2"))
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 27K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

        val networkRequest = strategy.networkRequest
        val cacheResponse = strategy.cacheResponse
    
        cache?.trackResponse(strategy)
        val listener = (call as? RealCall)?.eventListener ?: EventListener.NONE
    
        if (cacheCandidate != null && cacheResponse == null) {
          // The cache candidate wasn't applicable. Close it.
          cacheCandidate.body.closeQuietly()
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Mar 22 07:09:21 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

              ioe: IOException,
            ) = TODO()
    
            override fun canceled(call: Call) = TODO()
          }
        val none: EventListener = EventListener.NONE
      }
    
      @Test
      fun eventListenerBuilder() {
        var builder: EventListener.Factory = EventListener.Factory { TODO() }
      }
    
      @Test
      fun formBody() {
        val formBody: FormBody = FormBody.Builder().build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt

     */
    @SuppressSignatureCheck
    class WireSharkListenerFactory(
      private val logFile: File,
      private val tlsVersions: List<TlsVersion>,
      private val launch: Launch? = null,
    ) : EventListener.Factory {
      override fun create(call: Call): EventListener {
        return WireSharkKeyLoggerListener(logFile, launch == null)
      }
    
      fun launchWireShark(): Process? {
        when (launch) {
          null -> {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

        Logger.getLogger(TaskRunner::class.java.name).fn()
        Logger.getLogger("javax.net.ssl").fn()
      }
    
      fun wrap(eventListener: EventListener) = EventListener.Factory { ClientRuleEventListener(eventListener, ::addEvent) }
    
      fun wrap(eventListenerFactory: EventListener.Factory) =
        EventListener.Factory { call -> ClientRuleEventListener(eventListenerFactory.create(call), ::addEvent) }
    
      /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

    internal fun HttpUrl.canReuseConnectionFor(other: HttpUrl): Boolean =
      host == other.host &&
        port == other.port &&
        scheme == other.scheme
    
    internal fun EventListener.asFactory() = EventListener.Factory { this }
    
    /**
     * Reads until this is exhausted or the deadline has been reached. This is careful to not extend the
     * deadline if one exists already.
     */
    @Throws(IOException::class)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

        val latch1 = CountDownLatch(1)
        val latch2 = CountDownLatch(1)
        val latch3 = CountDownLatch(1)
        val latch4 = CountDownLatch(1)
        val listener1: EventListener =
          object : EventListener() {
            override fun connectStart(
              call: Call,
              inetSocketAddress: InetSocketAddress,
              proxy: Proxy,
            ) {
              try {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

          failWebSocket(ProtocolException("Request header not permitted: 'Sec-WebSocket-Extensions'"))
          return
        }
    
        val webSocketClient =
          client.newBuilder()
            .eventListener(EventListener.NONE)
            .protocols(ONLY_HTTP1)
            .build()
        val request =
          originalRequest.newBuilder()
            .header("Upgrade", "websocket")
            .header("Connection", "Upgrade")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 22.1K bytes
    - Viewed (0)
Back to top