Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for emit (0.22 sec)

  1. okhttp/src/test/java/okhttp3/SocksProxy.kt

          }
        }
        when (selectedMethod) {
          METHOD_NO_AUTHENTICATION_REQUIRED -> {
            fromSink.writeByte(VERSION_5)
            fromSink.writeByte(selectedMethod)
            fromSink.emit()
          }
          else -> throw ProtocolException("unsupported method: $selectedMethod")
        }
      }
    
      private fun acceptCommand(
        fromAddress: InetAddress,
        fromSource: BufferedSource,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

          if (currentRunLength > longestRunLength && currentRunLength >= 4) {
            longestRunOffset = currentRunOffset
            longestRunLength = currentRunLength
          }
          i += 2
        }
      }
    
      // Emit each 2-byte group in hex, separated by ':'. The longest run of zeroes is "::".
      val result = Buffer()
      var i = 0
      while (i < address.size) {
        if (i == longestRunOffset) {
          result.writeByte(':'.code)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

        server.webSocket!!.finishReader()
        server.listener.assertClosed(1000, "Bye!")
      }
    
      @Test
      fun emptyCloseInitiatesShutdown() {
        server.sink.write("8800".decodeHex()).emit() // Close without code.
        client.processNextFrame()
        client.listener.assertClosing(1005, "")
        client.webSocket!!.finishReader()
        assertThat(client.webSocket!!.close(1000, "Bye!")).isTrue()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

          source: Buffer,
          byteCount: Long,
        ) {
          lock.assertNotHeld()
    
          sendBuffer.write(source, byteCount)
          while (sendBuffer.size >= EMIT_BUFFER_SIZE) {
            emitFrame(false)
          }
        }
    
        /**
         * Emit a single data frame to the connection. The frame's size be limited by this stream's
         * write window. This method will block until the write window is nonempty.
         */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  5. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

      private val minimumDeflateSize: Long,
    ) : Closeable {
      /** This holds outbound data for compression and masking. */
      private val messageBuffer = Buffer()
    
      /** The [Buffer] of [sink]. Write to this and then flush/emit [sink]. */
      private val sinkBuffer: Buffer = sink.buffer
      private var writerClosed = false
    
      /** Lazily initialized on first use. */
      private var messageDeflater: MessageDeflater? = null
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        assertFailsWith<IllegalStateException> {
          sinkReference.get().flush()
        }
        assertFailsWith<IllegalStateException> {
          sinkReference.get().write("ghi".toByteArray())
          sinkReference.get().emit()
        }
      }
    
      @Test
      fun getHeadersThrows() {
        server.enqueue(MockResponse(socketPolicy = SocketPolicy.DisconnectAtStart))
        assertFailsWith<IOException> {
          getResponse(newRequest("/"))
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/InterceptorTest.kt

          }
    
          override fun writeTo(sink: BufferedSink) {
            val uppercase = uppercase(sink)
            val bufferedSink = uppercase.buffer()
            original!!.writeTo(bufferedSink)
            bufferedSink.emit()
          }
        }
      }
    
      private fun uppercase(original: BufferedSink): Sink {
        return object : ForwardingSink(original) {
          override fun write(
            source: Buffer,
            byteCount: Long,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  8. samples/tlssurvey/src/main/kotlin/okhttp3/survey/CipherSuiteSurvey.kt

    import okhttp3.survey.types.SuiteId
    
    /**
     * Organizes information on SSL cipher suite inclusion and precedence for this spreadsheet.
     * https://docs.google.com/spreadsheets/d/1C3FdZSlCBq_-qrVwG1KDIzNIB3Hyg_rKAcgmSzOsHyQ/edit#gid=0
     */
    class CipherSuiteSurvey(
      val clients: List<Client>,
      val ianaSuites: IanaSuites,
      val orderBy: List<SuiteId>,
    ) {
      fun printGoogleSheet() {
        print("name")
        for (client in clients) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Apr 02 01:44:15 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

            return connection.socket()
          }
        }
    
        return null
      }
    
      private fun <E : IOException?> timeoutExit(cause: E): E {
        if (timeoutEarlyExit) return cause
        if (!timeout.exit()) return cause
    
        val e = InterruptedIOException("timeout")
        if (cause != null) e.initCause(cause)
        @Suppress("UNCHECKED_CAST") // E is either IOException or IOException?
        return e as E
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  10. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

         * close that when they're done. Otherwise a handle to [file] will be leaked.
         */
        @Throws(IOException::class)
        fun edit(
          file: File,
          upstream: Source,
          metadata: ByteString,
          bufferMaxSize: Long,
        ): Relay {
          val randomAccessFile = RandomAccessFile(file, "rw")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
Back to top