【fix】 自定义netty 接收数据缓冲期控制接收数据大小

This commit is contained in:
wujiawei
2024-08-28 16:57:31 +08:00
parent fd364c78e7
commit 629910e860
19 changed files with 236 additions and 34 deletions

View File

@ -37,6 +37,7 @@ public class ServerHandleReportHandleChannelTransferTypeAdvanced extends Abstrac
public void doHandler(Channel channel, NettyProxyMsg msg) {
String clientId = new String(msg.getClientId());
Integer visitorPort = Integer.valueOf(new String(msg.getVisitorPort()));
// log.info("接收到客户端:[{}]内网穿透返回的数据:[{}]", clientId, msg.getData().length);
log.debug("接收到客户端:[{}]内网穿透返回的数据:[{}]", clientId, new String(msg.getData()));
// 将数据转发访客通道
byte[] visitorId = msg.getVisitorId();

View File

@ -67,6 +67,7 @@ public class LazyInternalNetworkPenetrationMappingApplicationImpl implements Laz
Integer clientTargetPort = lazyInternalNetworkPenetrationMapping.getClientTargetPort();
Integer visitorPort = lazyInternalNetworkPenetrationMapping.getVisitorPort();
// 创建访客通道池
this.changeSocket(clientId, clientTargetIp, clientTargetPort, visitorPort);
return lazyInternalNetworkPenetrationMappingRepository.story(lazyInternalNetworkPenetrationMapping);

View File

@ -69,7 +69,7 @@ public class LazyNettyServerVisitorDO {
* 访客端口池大小
*/
@Schema(description = "访客端口池大小", name = "poolSize", example = "")
@LazyTableFieldUnique(name = "pool_size", comment = "访客端口池大小", columnType = "int",defaultValue = "'20")
@LazyTableField(name = "pool_size", comment = "访客端口池大小", columnType = "int",defaultValue = "'20'")
private Integer poolSize;
/**
* 服务端ID