Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[milo-dev] UaTcpStatckClient.getEndpoints(link).get() not return a "real ip+port"

Hello,

My milo version is 0.2.1。

Here is my code:
EndpointDescription[] endpoints = UaTcpStackClient.getEndpoints(link).get();
EndpointDescription endpoint = Arrays.stream(endpoints)
.filter(e -> e.getSecurityPolicyUri().equals(securityPolicy.getSecurityPolicyUri()))
.findFirst()
.orElseThrow(() -> new Exception("create client failed"));
Debug information:

I pass "link"(opc.tcp://192.168.88.210:53530) to get endpoints, But I get the Endpoints is "DESKTOP-VFA7NRS:53530"。

The opc server is running on windows, the opc client is running on linux. I add "DESKTOP-VFA7NRS"  to the /etc/hosts to solve the problem in the past. 

But now, I want to connect to  three opc servers,  the three servers all return same endpoints: "opc.tcp://otc:56000".

How can I get real endpont of "ip:port"?

Thank you!
jianjiao 


sunjj@xxxxxxxxxxxxxx

Back to the top