注解,javaScript脚本分包
parent
fabdb00c4b
commit
3bbb9004cf
|
@ -7,7 +7,7 @@ import reactor.core.publisher.Flux;
|
|||
import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* 固定长度
|
||||
* 不处理
|
||||
*
|
||||
* @author huangwenl
|
||||
* @date 2022-10-13
|
||||
|
|
|
@ -83,6 +83,9 @@ public class TcpServerVerticle extends AbstractVerticle {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 初始TCP服务
|
||||
*/
|
||||
private void initTcpServer() {
|
||||
int instance = Math.max(2, config.getInstance());
|
||||
List<NetServer> instances = new ArrayList<>(instance);
|
||||
|
@ -127,6 +130,9 @@ public class TcpServerVerticle extends AbstractVerticle {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保活定时任务
|
||||
*/
|
||||
public void keepClientTask() {
|
||||
scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(2);
|
||||
|
||||
|
@ -236,7 +242,7 @@ public class TcpServerVerticle extends AbstractVerticle {
|
|||
}
|
||||
|
||||
/**
|
||||
* 递归断开连接
|
||||
* 断开连接,并移除子设备
|
||||
*/
|
||||
private void clientDisconnect(String deviceName) {
|
||||
VertxTcpClient remove = clientMap.remove(deviceName);
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
parser.delimited("\r\n")
|
||||
.handler(function(buffer){
|
||||
parser.result(parser.newBuffer().toString("UTF-8")).complete();
|
||||
});
|
||||
this.payloadParser = function (parser) {
|
||||
parser.delimited("\r\n")
|
||||
.handler(function(buffer){
|
||||
parser.result(buffer.toString("UTF-8")).complete();
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue