Commit b6c62fce by zhouhaibao

[+]ip处理

1 parent 0e4373e2
...@@ -113,8 +113,8 @@ public class TcpServer { ...@@ -113,8 +113,8 @@ public class TcpServer {
@SuppressWarnings({ "rawtypes" }) @SuppressWarnings({ "rawtypes" })
public <T extends TcpBase> TcpCallback<TcpRsp> sendSync(T data) { public <T extends TcpBase> TcpCallback<TcpRsp> sendSync(T data) {
/*String ip = getIp(future.channel());*/ ProxyInfo proxyInfo = ProxyHelper.getProxyInfo(data.getData().getPileIdStr());
String ip="11"; String ip=proxyInfo.getIp();
// seq字段处理 // seq字段处理
String seqKey = ip; String seqKey = ip;
if (data.getData() != null) { if (data.getData() != null) {
...@@ -123,7 +123,6 @@ public class TcpServer { ...@@ -123,7 +123,6 @@ public class TcpServer {
data.setSeq(Ocpp16Helper.generateSeq(seqKey)); data.setSeq(Ocpp16Helper.generateSeq(seqKey));
byte[] bs = Ocpp16Helper.build(data); byte[] bs = Ocpp16Helper.build(data);
ProxyInfo proxyInfo = ProxyHelper.getProxyInfo(data.getData().getPileIdStr());
log.info("【{}】读取proxyInfo:{}", data.getData().getPileIdStr(), proxyInfo); log.info("【{}】读取proxyInfo:{}", data.getData().getPileIdStr(), proxyInfo);
String key = proxyInfo.getChannel().attr(ProxyHelper.PILE_ID_KEY).get() + "+" + data.getSeq(); String key = proxyInfo.getChannel().attr(ProxyHelper.PILE_ID_KEY).get() + "+" + data.getSeq();
TcpCallback<TcpRsp> callback = new TcpCallback<>(TcpRsp.class); TcpCallback<TcpRsp> callback = new TcpCallback<>(TcpRsp.class);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!