- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for onEvent (0.03 sec)
-
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt
private val callback: Callback, ) { private var lastId: String? = null interface Callback { fun onEvent( id: String?, type: String?, data: String, ) fun onRetryChange(timeMs: Long) } /** * Process the next event. This will result in a single call to [Callback.onEvent] *unless* the * data section was empty. Any number of calls to [Callback.onRetryChange] may occur while
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 4.3K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceRecorder.kt
get().log("[ES] onOpen", Platform.INFO, null) events.add(Open(eventSource, response)) drainCancelQueue(eventSource) } override fun onEvent( eventSource: EventSource, id: String?, type: String?, data: String, ) { get().log("[ES] onEvent", Platform.INFO, null) events.add(Event(id, type, data)) drainCancelQueue(eventSource) } override fun onClosed(eventSource: EventSource) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:32:52 UTC 2025 - 3.2K bytes - Viewed (0) -
okhttp-sse/api/okhttp-sse.api
} 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
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 1.9K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt
} override fun request(): Request = request override fun cancel() { canceled = true call?.cancel() } override fun onEvent( id: String?, type: String?, data: String, ) { listener.onEvent(this, id, type, data) } override fun onRetryChange(timeMs: Long) { // Ignored. We do not auto-retry. }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 3.3K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceFactoryTest.java
assertEquals("text/event-stream", response.request().header("Accept")); } catch (Exception e) { future.completeExceptionally(e); } } @Override public void onEvent(@NotNull EventSource eventSource, @Nullable String id, @Nullable String type, @NotNull String data) { try { assertEquals("hello", data); future.complete(null); } catch (Exception e) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 2.8K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/EventSourceListener.kt
* * @param id The `id` line of the event, might be null. * @param type The `event` line of the event, might be null. * @param data The `data` line of the event. */ open fun onEvent( eventSource: EventSource, id: String?, type: String?, data: String, ) { } /** * Invoked when the HTTP connection has been closed normally. *
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 1.7K bytes - Viewed (0)