Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for WebSocketListener (0.13 sec)

  1. okhttp/src/main/kotlin/okhttp3/WebSocketListener.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import okio.ByteString
    
    abstract class WebSocketListener {
      /**
       * Invoked when a web socket has been accepted by the remote peer and may begin transmitting
       * messages.
       */
      open fun onOpen(
        webSocket: WebSocket,
        response: Response,
      ) {
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt

        settings = mockResponse.settings
        mockResponse =
          mockResponse.withWebSocketUpgrade(
            object : WebSocketListener() {
            },
          )
        var webSocketListener: WebSocketListener? = mockResponse.webSocketListener
        webSocketListener = mockResponse.webSocketListener
      }
    
      @Test @Ignore
      fun mockWebServer() {
        val mockWebServer: MockWebServer = MockWebServer()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

          return statusParts[2]
        }
    
      val headers: Headers
      val trailers: Headers
    
      // At most one of (body,webSocketListener,streamHandler) is non-null.
      val body: MockResponseBody?
      val webSocketListener: WebSocketListener?
      val streamHandler: StreamHandler?
    
      val inTunnel: Boolean
      val informationalResponses: List<MockResponse>
    
      val throttleBytesPerPeriod: Long
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java

    import java.util.concurrent.TimeUnit;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    import okhttp3.WebSocket;
    import okhttp3.WebSocketListener;
    import okio.ByteString;
    
    public final class WebSocketEcho extends WebSocketListener {
      private void run() {
        OkHttpClient client = new OkHttpClient.Builder()
            .readTimeout(0,  TimeUnit.MILLISECONDS)
            .build();
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 04 11:40:21 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  5. samples/slack/src/main/java/okhttp3/slack/RtmSession.java

     */
    package okhttp3.slack;
    
    import java.io.Closeable;
    import java.io.IOException;
    import okhttp3.WebSocket;
    import okhttp3.Response;
    import okhttp3.WebSocketListener;
    
    /** A realtime messaging session. */
    public final class RtmSession extends WebSocketListener implements Closeable {
      private final SlackApi slackApi;
    
      /** Guarded by this. */
      private WebSocket webSocket;
    
      public RtmSession(SlackApi slackApi) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Nov 19 20:16:58 UTC 2016
    - 2.4K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/AutobahnTester.kt

     * [Autobahn Testsuite](http://autobahn.ws/testsuite/).
     */
    class AutobahnTester {
      val client = OkHttpClient()
    
      private fun newWebSocket(
        path: String,
        listener: WebSocketListener,
      ): WebSocket {
        val request =
          Request.Builder()
            .url(HOST + path)
            .build()
        return client.newWebSocket(request, listener)
      }
    
      fun run() {
        try {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  7. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

      private var headersDelayAmount = 0L
      private var headersDelayUnit = TimeUnit.MILLISECONDS
    
      private var promises = mutableListOf<PushPromise>()
      var settings: Settings = Settings()
        private set
      var webSocketListener: WebSocketListener? = null
        private set
    
      val pushPromises: List<PushPromise>
        get() = promises
    
      init {
        setResponseCode(200)
        setHeader("Content-Length", 0L)
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt

    import java.util.concurrent.TimeUnit
    import okhttp3.Response
    import okhttp3.WebSocket
    import okhttp3.WebSocketListener
    import okhttp3.internal.platform.Platform
    import okio.ByteString
    
    class WebSocketRecorder(
      private val name: String,
    ) : WebSocketListener() {
      private val events = LinkedBlockingQueue<Any>()
      private var delegate: WebSocketListener? = null
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/DispatcherTest.kt

      @Test
      fun maxPerHostNotEnforcedForWebSockets() {
        dispatcher.maxRequestsPerHost = 2
        client.newWebSocket(newRequest("http://a/1"), webSocketListener)
        client.newWebSocket(newRequest("http://a/2"), webSocketListener)
        client.newWebSocket(newRequest("http://a/3"), webSocketListener)
        executor.assertJobs("http://a/1", "http://a/2", "http://a/3")
      }
    
      @Test
      fun increasingMaxRequestsPromotesJobsImmediately() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  10. mockwebserver/api/mockwebserver3.api

    	public final fun getThrottleBytesPerPeriod ()J
    	public final fun getThrottlePeriodNanos ()J
    	public final fun getTrailers ()Lokhttp3/Headers;
    	public final fun getWebSocketListener ()Lokhttp3/WebSocketListener;
    	public final fun newBuilder ()Lmockwebserver3/MockResponse$Builder;
    	public fun toString ()Ljava/lang/String;
    }
    
    public final class mockwebserver3/MockResponse$Builder : java/lang/Cloneable {
    	public fun <init> ()V
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 03 21:59:45 UTC 2023
    - 12.7K bytes
    - Viewed (0)
Back to top