Skip to content

Commit c8ae336

Browse files
committed
feat(扩展字段): 添加ClientPowerBoxSharedData添加新字段 isEnableSsl & 让PowerBoxWSClient继承了父类的#en/disableSSL方法
* 添加ClientPowerBoxSharedData添加新字段 isEnableSsl,用于WS地址协议头判断 * 让PowerBoxWSClient继承了父类的#enableSSL #disableSSL方法以适配添加ClientPowerBoxSharedData添加新字段的字段 isEnableSsl
1 parent fefa14a commit c8ae336

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

Common/src/main/java/com/r3944realms/dg_lab/websocket/PowerBoxWSClient.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,18 @@ protected void stopped() {
207207
operation.ClientStoppedHandler();
208208
}
209209

210+
@Override
211+
public void enableSSL() {
212+
super.enableSSL();
213+
sharedData.isEnableSsl = true;
214+
}
215+
216+
@Override
217+
public void disableSSL() {
218+
super.disableSSL();
219+
sharedData.isEnableSsl = false;
220+
}
221+
210222
@Override
211223
public void send(Message message) {
212224
if(message instanceof PowerBoxMessage PBMessage) {

Common/src/main/java/com/r3944realms/dg_lab/websocket/sharedData/ClientPowerBoxSharedData.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ public ClientPowerBoxSharedData clone() {
7575
* 二维码
7676
*/
7777
public String rqCodeUrl = "";
78+
/**
79+
* 是否启用 SSL
80+
*/
81+
public boolean isEnableSsl = false;
7882
/**
7983
* Instantiates a new Client power box shared data.
8084
*
@@ -95,7 +99,7 @@ public ClientPowerBoxSharedData() {}
9599
* @return the url
96100
*/
97101
public String getUrl() {
98-
return StringHandlerUtil.buildWebSocketURL(address, port, false);
102+
return StringHandlerUtil.buildWebSocketURL(address, port, isEnableSsl);
99103
}
100104

101105

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ org.gradle.configuration-cache=true
77
org.gradle.configuration-cache.problems=warn
88
# ROOT
99
project_name=DgLab
10-
project_version=4.2.10.17
10+
project_version=4.2.10.18
1111
project_group=top.r3944realms.dg_lab
1212

1313
# API

versionlog.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
统一用4位版本,对于测试性更新统一在其后加-Beta。
33
修复问题更新为加0.0.0.1,添加/移除新特性加0.0.1.0,小部分重构更新加0.1.0.0,大量重构加1.0.0.0
44

5+
2025-09-21-3
6+
project_version=4.2.10.18
7+
* 添加ClientPowerBoxSharedData添加新字段 isEnableSsl,用于WS地址协议头判断
8+
* 让PowerBoxWSClient继承了父类的#enableSSL #disableSSL方法以适配添加ClientPowerBoxSharedData添加新字段的字段 isEnableSsl
9+
10+
511
2025-09-21-2
612
project_version=4.2.10.17
713
* 修正 DGPBClientManager 的实现接口为com.r3944realms.dg_lab.api.manager.IDGLabManager

0 commit comments

Comments
 (0)