From 08145617594619119cf339a0e723a2f9c7e2b08c Mon Sep 17 00:00:00 2001 From: fengfei Date: Thu, 2 Nov 2017 21:35:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B6=E5=8F=91=E4=BC=98=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=85=BC=E5=AE=B9=E4=BB=A5=E5=89=8D=E7=9A=84=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/handlers/ClientChannelHandler.java | 4 ++-- .../client/handlers/RealServerChannelHandler.java | 4 ++-- .../org/fengfei/lanproxy/protocol/ProxyMessage.java | 13 ++++++------- .../server/handlers/ServerChannelHandler.java | 6 +++--- .../server/handlers/UserChannelHandler.java | 4 ++-- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/proxy-client/src/main/java/org/fengfei/lanproxy/client/handlers/ClientChannelHandler.java b/proxy-client/src/main/java/org/fengfei/lanproxy/client/handlers/ClientChannelHandler.java index b6a9bcd..74c538f 100644 --- a/proxy-client/src/main/java/org/fengfei/lanproxy/client/handlers/ClientChannelHandler.java +++ b/proxy-client/src/main/java/org/fengfei/lanproxy/client/handlers/ClientChannelHandler.java @@ -49,10 +49,10 @@ public class ClientChannelHandler extends SimpleChannelInboundHandler { buf.readBytes(bytes); String userId = ProxyChannelManager.getUserChannelUserId(userChannel); ProxyMessage proxyMessage = new ProxyMessage(); - proxyMessage.setType(ProxyMessage.TYPE_TRANSFER); + proxyMessage.setType(ProxyMessage.P_TYPE_TRANSFER); proxyMessage.setUri(userId); proxyMessage.setData(bytes); proxyChannel.writeAndFlush(proxyMessage); @@ -124,7 +124,7 @@ public class UserChannelHandler extends SimpleChannelInboundHandler { // 通知代理客户端,用户连接可写状态 String userId = ProxyChannelManager.getUserChannelUserId(userChannel); ProxyMessage proxyMessage = new ProxyMessage(); - proxyMessage.setType(ProxyMessage.TYPE_WRITE_CONTROL); + proxyMessage.setType(ProxyMessage.C_TYPE_WRITE_CONTROL); proxyMessage.setUri(userId); proxyMessage.setData(userChannel.isWritable() ? new byte[] { 0x01 } : new byte[] { 0x00 }); cmdChannel.writeAndFlush(proxyMessage);