Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for EventListener (0.18 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt

          trackFailure(e)
        }
        if (requestDone) {
          if (e != null) {
            eventListener.requestFailed(call, e)
          } else {
            eventListener.requestBodyEnd(call, bytesRead)
          }
        }
        if (responseDone) {
          if (e != null) {
            eventListener.responseFailed(call, e)
          } else {
            eventListener.responseBodyEnd(call, bytesRead)
          }
        }
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/CallConnectionUser.kt

    internal class CallConnectionUser(
      private val call: RealCall,
      private val poolConnectionListener: ConnectionListener,
      private val chain: RealInterceptorChain,
    ) : ConnectionUser {
      private val eventListener: EventListener
        get() = call.eventListener
    
      override fun addPlanToCancel(connectPlan: ConnectPlan) {
        call.plansToCancel += connectPlan
      }
    
      override fun removePlanToCancel(connectPlan: ConnectPlan) {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Wed Mar 06 17:33:38 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  3. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/LoggingEventListener.kt

    import java.net.Proxy
    import java.util.concurrent.TimeUnit
    import okhttp3.Call
    import okhttp3.Connection
    import okhttp3.EventListener
    import okhttp3.Handshake
    import okhttp3.HttpUrl
    import okhttp3.OkHttpClient
    import okhttp3.Protocol
    import okhttp3.Request
    import okhttp3.Response
    
    /**
     * An OkHttp EventListener, which logs call events. Can be applied as an
     * [event listener factory][OkHttpClient.eventListenerFactory].
     *
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 01 11:07:32 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  4. android-test/src/androidTest/java/okhttp/android/test/alpn/AlpnOverrideTest.kt

              listOf(
                ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
                  .supportsTlsExtensions(false)
                  .build(),
              ),
            )
            .eventListener(
              object : EventListener() {
                override fun connectionAcquired(
                  call: Call,
                  connection: Connection,
                ) {
                  val sslSocket = connection.socket() as SSLSocket
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

          }
        val localClient = client.newBuilder().eventListener(eventListener).build()
    
        val call1 = localClient.newCall(Request(server.url("/")))
    
        call1.execute().use { response ->
          assertThat(response.body.string()).isEqualTo("Req1")
          assertThat(response.handshake).isNotNull()
          assertThat(response.protocol == Protocol.HTTP_1_1)
        }
    
        eventListener.closed = true
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  6. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

      @RegisterExtension
      val clientTestRule = OkHttpClientTestRule()
      private val eventListener = RecordingEventListener()
      private val listener = EventSourceRecorder()
      private var client =
        clientTestRule.newClientBuilder()
          .eventListenerFactory(clientTestRule.wrap(eventListener))
          .build()
    
      @BeforeEach
      fun before(server: MockWebServer) {
        this.server = server
      }
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt

    import java.net.Proxy
    import java.util.concurrent.TimeUnit
    
    class ClientRuleEventListener(
      val delegate: EventListener = NONE,
      var logger: (String) -> Unit,
    ) : EventListener(),
      EventListener.Factory {
      private var startNs: Long? = null
    
      override fun create(call: Call): EventListener = this
    
      override fun callStart(call: Call) {
        startNs = System.nanoTime()
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/api/logging-interceptor.api

    }
    
    public class okhttp3/logging/LoggingEventListener$Factory : okhttp3/EventListener$Factory {
    	public fun <init> ()V
    	public fun <init> (Lokhttp3/logging/HttpLoggingInterceptor$Logger;)V
    	public synthetic fun <init> (Lokhttp3/logging/HttpLoggingInterceptor$Logger;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
    	public fun create (Lokhttp3/Call;)Lokhttp3/EventListener;
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 06 09:14:38 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/JSSETest.kt

        val sessionIds = mutableListOf<String>()
    
        assumeNetwork()
    
        client =
          client.newBuilder()
            .eventListenerFactory(
              clientTestRule.wrap(
                object : EventListener() {
                  override fun connectionAcquired(
                    call: Call,
                    connection: Connection,
                  ) {
                    val sslSocket = connection.socket() as SSLSocket
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/SessionReuseTest.kt

              }
            }
          }
    
        client =
          client.newBuilder()
            .connectionSpecs(listOf(spec))
            .eventListenerFactory(
              clientTestRule.wrap(
                object : EventListener() {
                  override fun connectionAcquired(
                    call: Call,
                    connection: Connection,
                  ) {
                    val sslSocket = connection.socket() as SSLSocket
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 6K bytes
    - Viewed (0)
Back to top