- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for qselect (0.22 sec)
-
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt
*/ @Throws(IOException::class) fun processNextEvent(): Boolean { var id = lastId var type: String? = null val data = Buffer() while (true) { when (source.select(options)) { in 0..2 -> { completeEvent(id, type, data) return true } in 3..4 -> { source.readData(data) } in 5..7 -> {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.3K bytes - Viewed (0) -
okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt
skipWhitespace() val type = select(optionsType) when (type) { TYPE_DEVIATION, TYPE_MAPPED, TYPE_DISALLOWED_STD3_MAPPED -> { skipWhitespace() if (readByte() != ';'.code.toByte()) throw IOException("expected ';'") // Like "0061" or "0031 2044 0034". while (true) { skipWhitespace() when (select(optionsDelimiter)) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 6.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/FakeProxySelector.kt
class FakeProxySelector : ProxySelector() { val proxies: MutableList<Proxy> = mutableListOf() fun addProxy(proxy: Proxy): FakeProxySelector { proxies.add(proxy) return this } override fun select(uri: URI): List<Proxy> { // Don't handle 'socket' schemes, which the RI's Socket class may request (for SOCKS). return if (uri.scheme == "http" || uri.scheme == "https") proxies else listOf(Proxy.NO_PROXY) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
private var fileOperator: FileOperator? = FileOperator(file!!.channel) /** The next byte to read. This is always less than or equal to [upstreamPos]. */ private var sourcePos = 0L /** * Selects where to find the bytes for a read and read them. This is one of three sources. * * ## Upstream * * In this case the current thread is assigned as the upstream reader. We read bytes from
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) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
) server.enqueue( MockResponse(code = 407), ) client = client.newBuilder() .proxySelector( object : ProxySelector() { override fun select(uri: URI): List<Proxy> = listOf(server.toProxyAddress()) override fun connectFailed( uri: URI, socketAddress: SocketAddress, e: IOException,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 131.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/proxy/NullProxySelector.kt
import java.net.ProxySelector import java.net.SocketAddress import java.net.URI /** * A proxy selector that always returns the [Proxy.NO_PROXY]. */ object NullProxySelector : ProxySelector() { override fun select(uri: URI?): List<Proxy> { requireNotNull(uri) { "uri must not be null" } return listOf(Proxy.NO_PROXY) } override fun connectFailed( uri: URI?, sa: SocketAddress?, ioe: IOException?,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt
proxySelector.assertRequests() // No proxy selector requests! } @Test fun proxySelectorReturnsNull() { val nullProxySelector: ProxySelector = object : ProxySelector() { override fun select(uri: URI): List<Proxy>? { assertThat(uri.host).isEqualTo(uriHost) return null } override fun connectFailed( uri: URI, socketAddress: SocketAddress,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Mar 06 17:33:38 GMT 2024 - 20.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt
val uri = url.toUri() if (uri.host == null) return immutableListOf(Proxy.NO_PROXY) // Try each of the ProxySelector choices until one connection succeeds. val proxiesOrNull = address.proxySelector.select(uri) if (proxiesOrNull.isNullOrEmpty()) return immutableListOf(Proxy.NO_PROXY) return proxiesOrNull.toImmutableList() } connectionUser.proxySelectStart(url) proxies = selectProxies()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Mar 06 17:33:38 GMT 2024 - 7.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocksProxyTest.kt
} @Test fun proxySelector() { server.enqueue(MockResponse.Builder().body("abc").build()) val proxySelector: ProxySelector = object : ProxySelector() { override fun select(uri: URI) = listOf(socksProxy.proxy()) override fun connectFailed( uri: URI, socketAddress: SocketAddress, e: IOException, ) = error("unexpected call") }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatform.kt
return null } else if (methodName == "protocols" && callArgs.isEmpty()) { return protocols // Client advertises these protocols. } else if ((methodName == "selectProtocol" || methodName == "select") && String::class.java == returnType && callArgs.size == 1 && callArgs[0] is List<*> ) { val peerProtocols = callArgs[0] as List<*> // Pick the first known protocol the peer advertises.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 6K bytes - Viewed (0)