Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 9 of 9 for ping_interval (0.11 seconds)

  1. tests/test_sse.py

    def slow_sync_stream():
        yield {"n": 1}
        time.sleep(0.3)
        yield {"n": 2}
    
    
    def test_keepalive_ping_async(monkeypatch: pytest.MonkeyPatch):
        monkeypatch.setattr(fastapi.routing, "_PING_INTERVAL", 0.05)
        with TestClient(keepalive_app) as c:
            response = c.get("/slow-async")
        assert response.status_code == 200
        text = response.text
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 09:21:52 GMT 2026
    - 9.8K bytes
    - Click Count (0)
  2. fastapi/sse.py

    
    # Keep-alive comment, per the SSE spec recommendation
    KEEPALIVE_COMMENT = b": ping\n\n"
    
    # Seconds between keep-alive pings when a generator is idle.
    # Private but importable so tests can monkeypatch it.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 09:21:52 GMT 2026
    - 6.2K bytes
    - Click Count (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt

         * [will fail with an IOException][java.io.IOException].
         *
         * The default value of 0 disables client-initiated pings.
         */
        fun pingInterval(
          interval: Long,
          unit: TimeUnit,
        ) = apply {
          pingInterval = checkDuration("interval", interval, unit)
        }
    
        /**
         * Sets the interval between HTTP/2 and web socket pings initiated by this client. Use this to
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Feb 03 22:17:59 GMT 2026
    - 51.5K bytes
    - Click Count (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketHttpTest.kt

        closeWebSockets(webSocket, server)
      }
    
      @Test
      @Throws(Exception::class)
      fun clientPingsServerOnInterval() {
        client =
          client
            .newBuilder()
            .pingInterval(Duration.ofMillis(500))
            .build()
        webServer.enqueue(
          MockResponse
            .Builder()
            .webSocketUpgrade(serverListener)
            .build(),
        )
        val webSocket = newWebSocket()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Nov 04 19:13:52 GMT 2025
    - 35.5K bytes
    - Click Count (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        builder = builder.readTimeout(Duration.ofSeconds(0L))
        builder = builder.writeTimeout(0L, TimeUnit.SECONDS)
        builder = builder.writeTimeout(Duration.ofSeconds(0L))
        builder = builder.pingInterval(0L, TimeUnit.SECONDS)
        builder = builder.pingInterval(Duration.ofSeconds(0L))
        builder = builder.proxy(Proxy.NO_PROXY)
        builder = builder.proxySelector(NullProxySelector)
        builder = builder.cookieJar(CookieJar.NO_COOKIES)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 49.7K bytes
    - Click Count (0)
  6. okhttp/api/jvm/okhttp.api

    	public final fun networkInterceptors ()Ljava/util/List;
    	public final fun pingInterval (JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;
    	public final fun pingInterval (Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;
    	public final fun pingInterval-LRDsOJo (J)Lokhttp3/OkHttpClient$Builder;
    	public final fun protocols (Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 72.3K bytes
    - Click Count (0)
  7. okhttp/api/android/okhttp.api

    	public final fun networkInterceptors ()Ljava/util/List;
    	public final fun pingInterval (JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;
    	public final fun pingInterval (Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;
    	public final fun pingInterval-LRDsOJo (J)Lokhttp3/OkHttpClient$Builder;
    	public final fun protocols (Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 72.3K bytes
    - Click Count (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

          .isEqualTo(1)
      }
    
      @Test
      fun pingsTransmitted() {
        // Ping every 500 ms, starting at 500 ms.
        client =
          client
            .newBuilder()
            .pingInterval(Duration.ofMillis(500))
            .build()
    
        // Delay the response to give 1 ping enough time to be sent and replied to.
        server.enqueue(
          MockResponse
            .Builder()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 67.5K bytes
    - Click Count (0)
  9. fastapi/routing.py

    from fastapi.exceptions import (
        EndpointContext,
        FastAPIError,
        RequestValidationError,
        ResponseValidationError,
        WebSocketRequestValidationError,
    )
    from fastapi.sse import (
        _PING_INTERVAL,
        KEEPALIVE_COMMENT,
        EventSourceResponse,
        ServerSentEvent,
        format_sse_event,
    )
    from fastapi.types import DecoratedCallable, IncEx
    from fastapi.utils import (
        create_model_field,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 193K bytes
    - Click Count (0)
Back to Top