Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for onClose (0.14 sec)

  1. samples/slack/src/main/java/okhttp3/slack/RtmSession.java

        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);
      }
    
      @Override public void onFailure(WebSocket webSocket, Throwable t, Response response) {
        // TODO(jwilson): can I read the response body? Do I have to?
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Nov 19 20:16:58 GMT 2016
    - 2.4K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt

          events.add(Closing(code, reason))
        }
      }
    
      override fun onClosed(
        webSocket: WebSocket,
        code: Int,
        reason: String,
      ) {
        Platform.get().log("[WS $name] onClosed $code", Platform.INFO, null)
        val delegate = delegate
        if (delegate != null) {
          this.delegate = null
          delegate.onClosed(webSocket, code, reason)
        } else {
          events.add(Closed(code, reason))
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  3. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceRecorder.kt

        data: String,
      ) {
        get().log("[ES] onEvent", Platform.INFO, null)
        events.add(Event(id, type, data))
        drainCancelQueue(eventSource)
      }
    
      override fun onClosed(eventSource: EventSource) {
        get().log("[ES] onClosed", Platform.INFO, null)
        events.add(Closed)
        drainCancelQueue(eventSource)
      }
    
      override fun onFailure(
        eventSource: EventSource,
        t: Throwable?,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/WebSocketListener.kt

      }
    
      /**
       * Invoked when both peers have indicated that no more messages will be transmitted and the
       * connection has been successfully released. No further calls to this listener will be made.
       */
      open fun onClosed(
        webSocket: WebSocket,
        code: Int,
        reason: String,
      ) {
      }
    
      /**
       * Invoked when a web socket has been closed due to an error reading from or writing to the
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  5. 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()) {
                synchronized(this@RealWebSocket) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

            ) = TODO()
    
            override fun onClosing(
              webSocket: WebSocket,
              code: Int,
              reason: String,
            ) = TODO()
    
            override fun onClosed(
              webSocket: WebSocket,
              code: Int,
              reason: String,
            ) = TODO()
    
            override fun onFailure(
              webSocket: WebSocket,
              t: Throwable,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  7. okhttp-sse/api/okhttp-sse.api

    	public abstract fun newEventSource (Lokhttp3/Request;Lokhttp3/sse/EventSourceListener;)Lokhttp3/sse/EventSource;
    }
    
    public abstract class okhttp3/sse/EventSourceListener {
    	public fun <init> ()V
    	public fun onClosed (Lokhttp3/sse/EventSource;)V
    	public fun onEvent (Lokhttp3/sse/EventSource;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    	public fun onFailure (Lokhttp3/sse/EventSource;Ljava/lang/Throwable;Lokhttp3/Response;)V
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 14:39:59 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  8. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSourceListener.kt

        id: String?,
        type: String?,
        data: String,
      ) {
      }
    
      /**
       * 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
    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 (2)
  9. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

              }
            listener.onFailure(this, exception, response)
            return
          }
          if (canceled) {
            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"
    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)
  10. okhttp/api/okhttp.api

    	public abstract fun newWebSocket (Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;
    }
    
    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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
Back to top