mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 08:49:40 -05:00
Add session id to websocket connection to get authenticated WS as well as optional customizable type for disconnecting websocket client in various ways.
This commit is contained in:
@@ -51,9 +51,17 @@ public interface LiveClient {
|
||||
|
||||
/**
|
||||
* Disconnects the connection.
|
||||
* @param type
|
||||
* <p>0 - Normal - Initiates disconnection and returns
|
||||
* <p>1 - Disconnects blocking and returns after closure
|
||||
* <p>2 - Disconnects and kills connection to websocket
|
||||
* <p>Default {@link #disconnect()} is 0
|
||||
*/
|
||||
void disconnect();
|
||||
void disconnect(int type);
|
||||
|
||||
default void disconnect() {
|
||||
disconnect(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use to manually invoke event
|
||||
|
||||
@@ -27,6 +27,6 @@ import io.github.jwdeveloper.tiktok.live.LiveClient;
|
||||
|
||||
public interface LiveSocketClient {
|
||||
void start(LiveConnectionData.Response webcastResponse, LiveClient tikTokLiveClient);
|
||||
void stop();
|
||||
void stop(int type);
|
||||
boolean isConnected();
|
||||
}
|
||||
Reference in New Issue
Block a user