okhttp / okhttp3 / WebSocket / Factory

Factory

interface Factory

Functions

newWebSocket

abstract fun newWebSocket(request: Request, listener: WebSocketListener): WebSocket

Creates a new web socket and immediately returns it. Creating a web socket initiates an asynchronous process to connect the socket. Once that succeeds or fails, listener will be notified. The caller must either close or cancel the returned web socket when it is no longer in use.

Inheritors

OkHttpClient

open class OkHttpClient : Cloneable, Call.Factory, WebSocket.Factory

Factory for calls, which can be used to send HTTP requests and read their responses.