public abstract class BaseWebsocketImpl extends Object implements Closeable
| 限定符 | 构造器和说明 |
|---|---|
protected |
BaseWebsocketImpl(okhttp3.OkHttpClient client,
okhttp3.WebSocketListener listener,
ChooseServerStrategy chooseServerStrategy) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
connect() |
protected String |
ping(String requestId) |
protected abstract WebsocketTokenResponse |
requestToken() |
protected String |
subscribe(String topic,
boolean privateChannel,
boolean response) |
protected String |
unsubscribe(String topic,
boolean privateChannel,
boolean response) |
protected BaseWebsocketImpl(okhttp3.OkHttpClient client,
okhttp3.WebSocketListener listener,
ChooseServerStrategy chooseServerStrategy)
public void connect()
throws IOException
IOExceptionprotected abstract WebsocketTokenResponse requestToken() throws IOException
IOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCopyright © 2023. All rights reserved.