About reverse connection

Suggestions for new features in our products, improvements and requirements ...

Moderator: Support Team

Post Reply
Jr. Member
Jr. Member
Posts: 2
Joined: 20 Feb 2019, 01:50

About reverse connection

Post by xiefeng2286 »

Dear Support Team:
I'm using the C++ based OPC UA SDK version 1.6.3 , because of the NAT and firewall , I need to use the new function of reverse connection , so do like this:

1.change the ServerConfig.xml file , add an element for ReverseConnect , such as <Url>opc.tcp://</Url> (the url of client reverse endpoint is opc.tcp:// ),the ip and port can be accessed by outside

1.set the value of bIsReverseConnect and sClientEndpointUrl before connect , such as OpcUa_True and "opc.tcp://" , the endpointurl is the same as ServerConfig.xml file
2.use beginConnect instead of connect, and the first param of this function need using the peer server's endpoint url,such as "opc.tcp://WIN-9P07670PDLE:48010" , and which must be include the hostname of the server ;

so my question is that I must to obtain the server's endpoint in advance , but in some times , the endpointurl need be dynamic accessed , don't need config in advance,so i do like this:
Firs call startReverseDiscovery of the class UaDiscovery , I'll get a notice on receivedReverseConnect , the inputparam sEndPointUrl is incoming , then start begin to invoke beginConnect .

that is right ?


Post Reply