Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for Kistner (0.24 sec)

  1. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

            ).setHeader("content-type", "text/event-stream")
            .build(),
        )
        val source = newEventSource()
        assertThat(source.request().url.encodedPath).isEqualTo("/")
        listener.assertOpen()
        listener.assertEvent(null, null, "hey")
        listener.assertClose()
      }
    
      @RetryingTest(5)
      fun cancelInEventShortCircuits() {
        server.enqueue(
          MockResponse.Builder()
            .body(
              """
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  2. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

            listener.onFailure(this, IOException("canceled"), response)
          } else {
            listener.onClosed(this)
          }
        }
      }
    
      private fun ResponseBody.isEventStream(): Boolean {
        val contentType = contentType() ?: return false
        return contentType.type == "text" && contentType.subtype == "event-stream"
      }
    
      override fun onFailure(
        call: Call,
        e: IOException,
      ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  3. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSourceListener.kt

      ) {
      }
    
      /**
       * TODO description.
       *
       * No further calls to this listener will be made.
       */
      open fun onClosed(eventSource: EventSource) {
      }
    
      /**
       * Invoked when an event source has been closed due to an error reading from or writing to the
       * network. Incoming events may have been lost. No further calls to this listener will be made.
       */
      open fun onFailure(
        eventSource: EventSource,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (1)
  4. okhttp/src/test/java/okhttp3/DuplexTest.kt

      var clientTestRule = OkHttpClientTestRule()
      private lateinit var server: MockWebServer
      private var listener = RecordingEventListener()
      private val handshakeCertificates = platform.localhostHandshakeCertificates()
      private var client =
        clientTestRule.newClientBuilder()
          .eventListenerFactory(clientTestRule.wrap(listener))
          .build()
      private val executorService = Executors.newScheduledThreadPool(1)
    
      @BeforeEach
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/AutobahnTester.kt

     */
    class AutobahnTester {
      val client = OkHttpClient()
    
      private fun newWebSocket(
        path: String,
        listener: WebSocketListener,
      ): WebSocket {
        val request =
          Request.Builder()
            .url(HOST + path)
            .build()
        return client.newWebSocket(request, listener)
      }
    
      fun run() {
        try {
          val count = getTestCount()
          println("Test count: $count")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. native-image-tests/src/main/kotlin/okhttp3/RunTests.kt

      return discovered.getEngineTestDescriptor(testEngine).descendants.toList()
    }
    
    /**
     * Builds the awkwardly package private TreePrintingListener listener which we would like to use
     * from ConsoleLauncher.
     *
     * https://github.com/junit-team/junit5/issues/2469
     */
    fun treeListener(): TestExecutionListener {
      val colorPalette =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

            val http2SocketHandler = Http2SocketHandler(socket, protocol)
            val connection =
              Http2Connection.Builder(false, taskRunner)
                .socket(socket)
                .listener(http2SocketHandler)
                .build()
            connection.start()
            openConnections.add(connection)
            openClientSockets.remove(socket)
            return
          } else if (protocol !== Protocol.HTTP_1_1) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt

     *
     * Steps to run in your own code
     *
     * 1. In your main method `WireSharkListenerFactory.register()`
     * 2. Create Listener factory `val eventListenerFactory = WireSharkListenerFactory(
    logFile = File("/tmp/key.log"), tlsVersions = tlsVersions, launch = launch)`
     * 3. Register with `client.eventListenerFactory(eventListenerFactory)`
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (1)
  9. okhttp/src/main/kotlin/okhttp3/EventListener.kt

     * limitations under the License.
     */
    package okhttp3
    
    import java.io.IOException
    import java.net.InetAddress
    import java.net.InetSocketAddress
    import java.net.Proxy
    
    /**
     * Listener for metrics events. Extend this class to monitor the quantity, size, and duration of
     * your application's HTTP calls.
     *
     * All start/connect/acquire events will eventually receive a matching end/release event, either
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15.2K bytes
    - Viewed (0)
  10. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

        return EventSource.Factory { request, listener ->
          val actualRequest =
            if (request.header("Accept") == null) {
              request.newBuilder().addHeader("Accept", "text/event-stream").build()
            } else {
              request
            }
    
          RealEventSource(actualRequest, listener).apply {
            connect(callFactory)
          }
        }
      }
    
      @JvmStatic
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:18:15 GMT 2024
    - 1.6K bytes
    - Viewed (1)
Back to top