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:
kohlerpop1
2025-05-21 18:43:14 -04:00
parent dd2f311539
commit 7e59099793
6 changed files with 34 additions and 13 deletions

View File

@@ -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

View File

@@ -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();
}