Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 210 for onClosed (0.17 sec)

  1. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  2. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  3. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Dec 17 14:39:59 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  4. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (1)
  5. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  6. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  7. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  8. 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 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 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/StreamsTest.java

        RuntimeException exception3 = new ArithmeticException("exception from stream 3");
        Stream<String> stream1 = Stream.of("foo", "bar").onClose(doThrow(exception1));
        Stream<String> stream2 = Stream.of("baz", "buh").onClose(doThrow(exception2));
        Stream<String> stream3 = Stream.of("quux").onClose(doThrow(exception3));
        RuntimeException exception = null;
        try (Stream<String> concatenated = Streams.concat(stream1, stream2, stream3)) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 20K bytes
    - Viewed (0)
Back to top