Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for webSocketUpgrade (0.12 sec)

  1. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

      @Throws(InterruptedException::class)
      fun tearDown() {
        clientListener.assertExhausted()
      }
    
      @Test
      fun textMessage() {
        webServer.enqueue(
          MockResponse.Builder()
            .webSocketUpgrade(serverListener)
            .build(),
        )
        val webSocket: WebSocket = newWebSocket()
        clientListener.assertOpen()
        val server = serverListener.assertOpen()
        webSocket.send("Hello, WebSockets!")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

    internal fun MockResponse.wrap(): mockwebserver3.MockResponse {
      val result = mockwebserver3.MockResponse.Builder()
      val copyFromWebSocketListener = webSocketListener
      if (copyFromWebSocketListener != null) {
        result.webSocketUpgrade(copyFromWebSocketListener)
      }
    
      val body = getBody()
      if (body != null) result.body(body)
    
      for (pushPromise in pushPromises) {
        result.addPush(pushPromise.wrap())
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

          }
    
        /**
         * Attempts to perform a web socket upgrade on the connection.
         * This will overwrite any previously set status, body, or streamHandler.
         */
        fun webSocketUpgrade(listener: WebSocketListener) =
          apply {
            status = "HTTP/1.1 101 Switching Protocols"
            setHeader("Connection", "Upgrade")
            setHeader("Upgrade", "websocket")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. mockwebserver/api/mockwebserver3.api

    	public final fun throttleBody (JJLjava/util/concurrent/TimeUnit;)Lmockwebserver3/MockResponse$Builder;
    	public final fun trailers (Lokhttp3/Headers;)Lmockwebserver3/MockResponse$Builder;
    	public final fun webSocketUpgrade (Lokhttp3/WebSocketListener;)Lmockwebserver3/MockResponse$Builder;
    }
    
    public final class mockwebserver3/MockResponse$Companion {
    }
    
    public abstract interface class mockwebserver3/MockResponseBody {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 03 21:59:45 UTC 2023
    - 12.7K bytes
    - Viewed (0)
Back to top