gpt4 book ai didi

java - 错误: remoteAddress not set - jreactive-8583

转载 作者:行者123 更新时间:2023-11-30 06:33:45 27 4
gpt4 key购买 nike

我们的服务器运行良好,下面是我们代码的非常基本的版本:

MessageFactory<IsoMessage> messageFactory = ConfigParser.createDefault();
Iso8583Client<IsoMessage> client = new Iso8583Client< (socketAddress,ClientConfiguration.getDefault(),messageFactory);
client.addMessageListener(new IsoMessageListener<IsoMessage>() {

@Override
public boolean applies(IsoMessage arg0) {

return false;
}

@Override
public boolean onMessage(ChannelHandlerContext arg0, IsoMessage arg1) {

return false;
}
});
client.getConfiguration().setReplyOnError(true);

client.init();
EventLoopGroup group = new NioEventLoopGroup();
try {
client.connect("127.0.0.1", 8080);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
System.out.println("Problem in client Connection");
e.printStackTrace();
}

我收到以下错误,请帮忙:

线程“main”中出现异常 java.lang.IllegalStateException:remoteAddress 未设置在 io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:116)在 com.github.kpavlov.jreactive8583.client.Iso8583Client.connectAsync(Iso8583Client.java:88)在 com.github.kpavlov.jreactive8583.client.Iso8583Client.connect(Iso8583Client.java:48)在 com.github.kpavlov.jreactive8583.client.Iso8583Client.connect(Iso8583Client.java:75)在 com.github.kpavlov.jreactive8583.client.Iso8583Client.connect(Iso8583Client.java:63)在 com.tushar.jreactive8583.demo_iso8385.AppClient.main(AppClient.java:62)

最佳答案

替换

Iso8583Client<IsoMessage> client = new Iso8583Client<>(messageFactory);

SocketAddress socketAddress = new InetSocketAddress("127.0.0.1", 8080);
Iso8583Client<IsoMessage> client = new Iso8583Client<>(socketAddress, messageFactory);

关于java - 错误: remoteAddress not set - jreactive-8583,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45587616/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com