Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for onClosing (0.19 sec)

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

        } else {
          events.add(Message(string = text))
        }
      }
    
      override fun onClosing(
        webSocket: WebSocket,
        code: Int,
        reason: String,
      ) {
        Platform.get().log("[WS $name] onClosing $code", Platform.INFO, null)
        val delegate = delegate
        if (delegate != null) {
          this.delegate = null
          delegate.onClosing(webSocket, code, reason)
        } else {
          events.add(Closing(code, reason))
        }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/AutobahnTester.kt

            }
    
            override fun onMessage(
              webSocket: WebSocket,
              text: String,
            ) {
              webSocket.send(text)
            }
    
            override fun onClosing(
              webSocket: WebSocket,
              code: Int,
              reason: String,
            ) {
              webSocket.close(1000, null)
              latch.countDown()
            }
    
            override fun onFailure(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  3. samples/slack/src/main/java/okhttp3/slack/RtmSession.java

      // TOOD(jwilson): decode incoming messages and dispatch them somewhere.
      @Override public void onMessage(WebSocket webSocket, String text) {
        System.out.println("onMessage: " + text);
      }
    
      @Override public void onClosing(WebSocket webSocket, int code, String reason) {
        webSocket.close(1000, null);
        System.out.println("onClose (" + code + "): " + reason);
      }
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Nov 19 20:16:58 GMT 2016
    - 2.4K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java

        System.out.println("MESSAGE: " + text);
      }
    
      @Override public void onMessage(WebSocket webSocket, ByteString bytes) {
        System.out.println("MESSAGE: " + bytes.hex());
      }
    
      @Override public void onClosing(WebSocket webSocket, int code, String reason) {
        webSocket.close(1000, null);
        System.out.println("CLOSE: " + code + " " + reason);
      }
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 04 11:40:21 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/WebSocketListener.kt

      open fun onMessage(
        webSocket: WebSocket,
        bytes: ByteString,
      ) {
      }
    
      /**
       * Invoked when the remote peer has indicated that no more incoming messages will be transmitted.
       */
      open fun onClosing(
        webSocket: WebSocket,
        code: Int,
        reason: String,
      ) {
      }
    
      /**
       * Invoked when both peers have indicated that no more messages will be transmitted and the
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

                return
              }
    
              // Apply the extensions. If they're unacceptable initiate a graceful shut down.
              // TODO(jwilson): Listeners should get onFailure() instead of onClosing() + onClosed(1010).
              val extensions = WebSocketExtensions.parse(response.headers)
              ******@****.***ions = extensions
              if (!extensions.isValid()) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

        clientListener.assertOpen()
        val server = serverListener.assertOpen()
        val e = RuntimeException()
        clientListener.setNextEventDelegate(
          object : WebSocketListener() {
            override fun onClosing(
              webSocket: WebSocket,
              code: Int,
              reason: String,
            ) {
              throw e
            }
          },
        )
        server.close(1000, "bye")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  8. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

              text: String,
            ) = TODO()
    
            override fun onMessage(
              webSocket: WebSocket,
              bytes: ByteString,
            ) = TODO()
    
            override fun onClosing(
              webSocket: WebSocket,
              code: Int,
              reason: String,
            ) = TODO()
    
            override fun onClosed(
              webSocket: WebSocket,
              code: Int,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  9. okhttp/api/okhttp.api

    }
    
    public abstract class okhttp3/WebSocketListener {
    	public fun <init> ()V
    	public fun onClosed (Lokhttp3/WebSocket;ILjava/lang/String;)V
    	public fun onClosing (Lokhttp3/WebSocket;ILjava/lang/String;)V
    	public fun onFailure (Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V
    	public fun onMessage (Lokhttp3/WebSocket;Ljava/lang/String;)V
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

        constructed = false // The enclosed object written in block() is not constructed.
        path += name
        try {
          block(content)
          constructedBit = if (constructed) 0b0010_0000 else 0
          constructed = true // The enclosing object is constructed.
        } finally {
          stack.removeAt(stack.size - 1)
          path.removeAt(path.size - 1)
        }
    
        val sink = sink()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
Back to top