接口的使用
com.lark.oapi.okhttp.WebSocket
使用WebSocket的程序包
程序包
说明
An HTTP+HTTP/2 client for Android and Java applications.
-
com.lark.oapi.okhttp中WebSocket的使用
修饰符和类型方法说明OkHttpClient.newWebSocket(Request request, WebSocketListener listener) Usesrequestto connect a new web socket.WebSocket.Factory.newWebSocket(Request request, WebSocketListener listener) Creates a new web socket and immediately returns it.参数类型为WebSocket的com.lark.oapi.okhttp中的方法修饰符和类型方法说明voidInvoked when both peers have indicated that no more messages will be transmitted and the connection has been successfully released.voidInvoked when the remote peer has indicated that no more incoming messages will be transmitted.voidInvoked when a web socket has been closed due to an error reading from or writing to the network.voidWebSocketListener.onMessage(WebSocket webSocket, ByteString bytes) Invoked when a binary (type0x2) message has been received.voidInvoked when a text (type0x1) message has been received.voidInvoked when a web socket has been accepted by the remote peer and may begin transmitting messages. -
com.lark.oapi.okhttp.internal.ws中WebSocket的使用
-
com.lark.oapi.ws中WebSocket的使用
参数类型为WebSocket的com.lark.oapi.ws中的方法修饰符和类型方法说明voidvoidvoidvoidListener.onMessage(WebSocket webSocket, ByteString bytes) voidvoid