tcp数据粘包处理
This commit is contained in:
@@ -112,6 +112,7 @@ public class AgentDecoderHandler extends ChannelInboundHandlerAdapter {
|
||||
endsWith = content.endsWith("@tong-ran");
|
||||
//判断是否是整包
|
||||
if(endsWith){
|
||||
content = content.replaceAll("agent-client:","");
|
||||
String[] arr = content.split("@tong-ran");
|
||||
for (String message : arr) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(message);
|
||||
|
||||
Reference in New Issue
Block a user