|
3 | 3 | import lombok.extern.slf4j.Slf4j;
|
4 | 4 | import org.wowtools.hppt.common.pojo.SessionBytes;
|
5 | 5 | import org.wowtools.hppt.common.pojo.TalkMessage;
|
6 |
| -import org.wowtools.hppt.common.util.AesCipherUtil; |
7 |
| -import org.wowtools.hppt.common.util.CommonConfig; |
8 |
| -import org.wowtools.hppt.common.util.Constant; |
9 |
| -import org.wowtools.hppt.common.util.DebugConfig; |
| 6 | +import org.wowtools.hppt.common.util.*; |
10 | 7 |
|
11 | 8 | import java.nio.charset.StandardCharsets;
|
12 | 9 | import java.util.LinkedList;
|
@@ -35,7 +32,7 @@ public class ClientTalker {
|
35 | 32 | * @throws Exception
|
36 | 33 | */
|
37 | 34 | public static byte[] buildSendToServerBytes(CommonConfig config, long maxSendBodySize,
|
38 |
| - BlockingQueue<String> sendCommandQueue, BlockingQueue<SessionBytes> sendBytesQueue, |
| 35 | + BufferPool<String> sendCommandQueue, BufferPool<SessionBytes> sendBytesQueue, |
39 | 36 | AesCipherUtil aesCipherUtil, boolean wait) throws Exception {
|
40 | 37 | long sendBodySize = 0;//大致预估发送体积
|
41 | 38 | //命令
|
@@ -99,7 +96,7 @@ public static byte[] buildSendToServerBytes(CommonConfig config, long maxSendBod
|
99 | 96 |
|
100 | 97 | //接收服务端发来的字节并做相应处理
|
101 | 98 | public static boolean receiveServerBytes(CommonConfig config, byte[] responseBody,
|
102 |
| - ClientSessionManager clientSessionManager, AesCipherUtil aesCipherUtil, BlockingQueue<String> sendCommandQueue, |
| 99 | + ClientSessionManager clientSessionManager, AesCipherUtil aesCipherUtil, BufferPool<String> sendCommandQueue, |
103 | 100 | Map<Integer, ClientBytesSender.SessionIdCallBack> sessionIdCallBackMap) throws Exception {
|
104 | 101 | if (null == responseBody) {
|
105 | 102 | return true;
|
|
0 commit comments