- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for Kistner (0.2 sec)
-
okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt
return EventSource.Factory { request, listener -> val actualRequest = if (request.header("Accept") == null) { request.newBuilder().addHeader("Accept", "text/event-stream").build() } else { request } RealEventSource(actualRequest, listener).apply { connect(callFactory) } } } @JvmStatic
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 04:18:15 GMT 2024 - 1.6K bytes - Viewed (1) -
okhttp-sse/src/main/kotlin/okhttp3/sse/EventSource.kt
* asynchronous process to connect the socket. Once that succeeds or fails, `listener` will be * notified. The caller must cancel the returned event source when it is no longer in use. */ fun newEventSource( request: Request, listener: EventSourceListener, ): EventSource }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.4K bytes - Viewed (0) -
docs/features/events.md
![Events Diagram](../assets/images/******@****.***) Here’s a [sample event listener](https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java) that prints each event with a timestamp. ```java class PrintingEventListener extends EventListener {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 7.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt
@RegisterExtension @JvmField var clientTestRule = OkHttpClientTestRule() private val listener = RecordingEventListener() private val handshakeCertificates = platform.localhostHandshakeCertificates() private var client = clientTestRule.newClientBuilder() .eventListenerFactory(clientTestRule.wrap(listener)) .build() private lateinit var server: MockWebServer @BeforeEach
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 9.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/ConnectionListener.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3 import okio.IOException /** * Listener for connection events. Extend this class to monitor the new connections and closes. * * All event methods must execute fast, without external locking, cannot throw exceptions,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 23 14:31:42 GMT 2024 - 2.2K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourcesHttpTest.kt
val request = Request.Builder() .url(server.url("/")) .build() val response = client.newCall(request).execute() processResponse(response, listener) listener.assertOpen() listener.assertEvent(null, null, "hey") listener.assertClose() } @Test fun cancelShortCircuits() { server.enqueue( MockResponse.Builder() .body( """ |data: hey
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Jan 14 10:20:09 GMT 2024 - 2.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt
private val name: String, ) : WebSocketListener() { private val events = LinkedBlockingQueue<Any>() private var delegate: WebSocketListener? = null /** Sets a delegate for handling the next callback to this listener. Cleared after invoked. */ fun setNextEventDelegate(delegate: WebSocketListener?) { this.delegate = delegate } override fun onOpen( webSocket: WebSocket, response: Response, ) {
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) -
okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt
val response = call.execute() assertThat(response.code).isEqualTo(200) response.body.close() listener.removeUpToEvent(ConnectionEvent.ConnectEnd::class.java) listener.removeUpToEvent(ConnectionEvent.ConnectionReleased::class.java) listener.removeUpToEvent(ConnectionEvent.ConnectionAcquired::class.java) listener.removeUpToEvent(ConnectionEvent.ConnectionReleased::class.java) } @Test
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 9.6K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocket.kt
return delegate!!.session } override fun addHandshakeCompletedListener(listener: HandshakeCompletedListener) { delegate!!.addHandshakeCompletedListener(listener) } override fun removeHandshakeCompletedListener(listener: HandshakeCompletedListener) { delegate!!.removeHandshakeCompletedListener(listener) } @Throws(IOException::class) override fun startHandshake() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 7.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/WebSocketListener.kt
*/ 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 * network. Both outgoing and incoming messages may have been lost. No further calls to this * listener will be made. */ open fun onFailure(
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)