接口 WebSocket.Factory
- 所有已知实现类:
OkHttpClient
- 封闭接口:
WebSocket
public static interface WebSocket.Factory
-
方法概要
修饰符和类型方法说明newWebSocket(Request request, WebSocketListener listener) Creates a new web socket and immediately returns it.
-
方法详细资料
-
newWebSocket
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,listenerwill be notified. The caller must either close or cancel the returned web socket when it is no longer in use.
-