diff --git a/test/src/main/java/com/ljsd/network/client/NettyClient.java b/test/src/main/java/com/ljsd/network/client/NettyClient.java index 82268a3be..4e00385db 100644 --- a/test/src/main/java/com/ljsd/network/client/NettyClient.java +++ b/test/src/main/java/com/ljsd/network/client/NettyClient.java @@ -1,7 +1,6 @@ package com.ljsd.network.client; import com.google.protobuf.*; -import com.ljsd.jieling.netty.PackageConstant; import com.ljsd.jieling.netty.cocdex.Tea; import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; @@ -14,12 +13,10 @@ import rpc.protocols.*; import java.util.ArrayList; import java.util.Arrays; -import java.util.Base64; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.TimeUnit; -import static com.ljsd.jieling.netty.PackageConstant.GAMEID_LEN; public class NettyClient { @@ -306,23 +303,23 @@ public class NettyClient { return PlayerInfoProto.WorkShopEquipCreateRequest.newBuilder().setEquipTid(equipTid).build(); } - public static byte[] wrappedBuffer(short gameId, byte[] content) { - int length = PackageConstant.GAMEID_LEN+PackageConstant.CONTENT_LEN+content.length; - byte[] bytes = new byte[length]; - int pos = 0; - Tea.shortToByte(bytes, pos, gameId); - pos += PackageConstant.GAMEID_LEN; - Tea.intToByte(bytes, pos, content.length); - pos += PackageConstant.CONTENT_LEN; - - - if (content.length != 0) { - System.arraycopy(content, 0, bytes, pos, content.length); - } -// if (backMessage.length != 0) { -// LOGGER.info("wrappedBuffer uid=>{} sendbyte=>{}", uid, bytes1.length); +// public static byte[] wrappedBuffer(short gameId, byte[] content) { +// int length = PackageConstant.GAMEID_LEN+PackageConstant.CONTENT_LEN+content.length; +// byte[] bytes = new byte[length]; +// int pos = 0; +// Tea.shortToByte(bytes, pos, gameId); +// pos += PackageConstant.GAMEID_LEN; +// Tea.intToByte(bytes, pos, content.length); +// pos += PackageConstant.CONTENT_LEN; +// +// +// if (content.length != 0) { +// System.arraycopy(content, 0, bytes, pos, content.length); // } - return bytes; - } +//// if (backMessage.length != 0) { +//// LOGGER.info("wrappedBuffer uid=>{} sendbyte=>{}", uid, bytes1.length); +//// } +// return bytes; +// } }