public class AudioWebsocketRequest
extends okhttp3.WebSocketListener
| 构造器和说明 |
|---|
AudioWebsocketRequest() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkStatus() |
void |
close() |
void |
close(int code,
String reason) |
void |
connect(String apiKey,
String workspace,
Map<String,String> customHeaders,
String baseWebSocketUrl,
AudioWebsocketCallback callback) |
boolean |
isClosed() |
boolean |
isOpen() |
void |
onClosed(okhttp3.WebSocket webSocket,
int code,
String reason) |
void |
onFailure(okhttp3.WebSocket webSocket,
Throwable t,
okhttp3.Response response) |
void |
onMessage(okhttp3.WebSocket webSocket,
okio.ByteString bytes) |
void |
onMessage(okhttp3.WebSocket webSocket,
String text) |
void |
onOpen(okhttp3.WebSocket webSocket,
okhttp3.Response response) |
void |
sendBinaryMessage(okio.ByteString rawData) |
void |
sendTextMessage(String message) |
public boolean isOpen()
public boolean isClosed()
public void checkStatus()
public void connect(String apiKey, String workspace, Map<String,String> customHeaders, String baseWebSocketUrl, AudioWebsocketCallback callback) throws NoApiKeyException, InterruptedException, RuntimeException
public void close()
public void close(int code,
String reason)
public void sendTextMessage(String message)
public void sendBinaryMessage(okio.ByteString rawData)
public void onOpen(okhttp3.WebSocket webSocket,
okhttp3.Response response)
onOpen 在类中 okhttp3.WebSocketListenerpublic void onMessage(okhttp3.WebSocket webSocket,
String text)
onMessage 在类中 okhttp3.WebSocketListenerpublic void onMessage(okhttp3.WebSocket webSocket,
okio.ByteString bytes)
onMessage 在类中 okhttp3.WebSocketListenerpublic void onClosed(okhttp3.WebSocket webSocket,
int code,
String reason)
onClosed 在类中 okhttp3.WebSocketListenerpublic void onFailure(okhttp3.WebSocket webSocket,
Throwable t,
okhttp3.Response response)
onFailure 在类中 okhttp3.WebSocketListenerCopyright © 2026. All rights reserved.