Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for IsClosed (0.42 sec)

  1. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

        assertThat(c1.socket().isClosed).isFalse()
        assertThat(c2.socket().isClosed).isFalse()
    
        // Add a third connection
        val c3 = factory.newConnection(pool, routeC1, 75L)
    
        // The third connection bounces the first.
        assertThat(pool.closeConnections(100L)).isEqualTo(0L)
        assertThat(pool.connectionCount()).isEqualTo(2)
        assertThat(c1.socket().isClosed).isTrue()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

        val source2 = relay.newSource()
        source1!!.close()
        source1.close() // Unnecessary. Shouldn't decrement the reference count.
        assertThat(relay.isClosed).isFalse()
        source2!!.close()
        assertThat(relay.isClosed).isTrue()
        assertFile(Relay.PREFIX_DIRTY, -1L, -1, null, null)
      }
    
      @Test
      fun racingReaders() {
        val pipe = Pipe(1024)
        val sink = pipe.sink.buffer()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        lock.assertNotHeld()
    
        val nowNs = System.nanoTime()
    
        val rawSocket = this.rawSocket!!
        val socket = this.socket!!
        val source = this.source!!
        if (rawSocket.isClosed || socket.isClosed || socket.isInputShutdown ||
          socket.isOutputShutdown
        ) {
          return false
        }
    
        val http2Connection = this.http2Connection
        if (http2Connection != null) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocket.kt

      }
    
      override fun isBound(): Boolean {
        return delegate!!.isBound
      }
    
      override fun isConnected(): Boolean {
        return delegate!!.isConnected
      }
    
      override fun isClosed(): Boolean {
        return delegate!!.isClosed
      }
    
      @Throws(IOException::class)
      override fun bind(localAddr: SocketAddress) {
        delegate!!.bind(localAddr)
      }
    
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

       * resources are released and all following calls to [.newSource] return null. Guarded by this.
       */
      var sourceCount = 0
    
      val isClosed: Boolean
        get() = file == null
    
      @Throws(IOException::class)
      private fun writeHeader(
        prefix: ByteString,
        upstreamSize: Long,
        metadataSize: Long,
      ) {
        val header =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Cache.kt

      internal var writeSuccessCount = 0
      internal var writeAbortCount = 0
      private var networkCount = 0
      private var hitCount = 0
      private var requestCount = 0
    
      val isClosed: Boolean
        get() = cache.isClosed()
    
      internal fun get(request: Request): Response? {
        val key = key(request.url)
        val snapshot: DiskLruCache.Snapshot =
          try {
            cache[key] ?: return null
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

       * trailers. Undefined until the end of the response body.
       */
      private var trailers: Headers? = null
    
      /** Returns true if this connection is closed. */
      val isClosed: Boolean
        get() = state == STATE_CLOSED
    
      override fun createRequestBody(
        request: Request,
        contentLength: Long,
      ): Sink {
        return when {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

      @ArgumentsSource(FileSystemParamProvider::class)
      fun isClosed_uninitializedCache(parameters: Pair<FileSystem, Boolean>) {
        setUp(parameters.first, parameters.second)
        // Create an uninitialized cache.
        cache =
          DiskLruCache(filesystem, cacheDir, appVersion, 2, Int.MAX_VALUE.toLong(), taskRunner).also {
            toClose.add(it)
          }
        assertThat(cache.isClosed()).isFalse()
        cache.close()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

      @Synchronized
      @Throws(IOException::class)
      override fun flush() {
        if (!initialized) return
    
        checkNotClosed()
        trimToSize()
        journalWriter!!.flush()
      }
    
      @Synchronized fun isClosed(): Boolean = closed
    
      /** Closes this cache. Stored values will remain on the filesystem. */
      @Synchronized
      @Throws(IOException::class)
      override fun close() {
        if (!initialized || closed) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  10. okhttp/api/okhttp.api

    	public final fun directoryPath ()Lokio/Path;
    	public final fun evictAll ()V
    	public fun flush ()V
    	public final fun hitCount ()I
    	public final fun initialize ()V
    	public final fun isClosed ()Z
    	public static final fun key (Lokhttp3/HttpUrl;)Ljava/lang/String;
    	public final fun maxSize ()J
    	public final fun networkCount ()I
    	public final fun requestCount ()I
    	public final fun size ()J
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
Back to top