Connect to Multi-Server failed

Questions regarding the use of the ANSI C SDK for Server or Client development or integration into customer products ...

Moderator: uasdkc

Post Reply
IceballSHooter
Jr. Member
Jr. Member
Posts: 3
Joined: 04 Feb 2018, 10:21

Connect to Multi-Server failed

Post by IceballSHooter »

Hello, support team

I am now trying to connect two servers with one client at same time. I have create two sessions by calling UaClient_Session_Create() twice, and created different UaClient_Discovery for Endpoints.
After successfully find servers and get endpoint. I begin to connect to those servers by calling UaClient_Session_BeginConnect().

However, during the connection, i found if one server is connectd, the other one will automaticly have disconnected status in Callback.

What should i do? Is there any setting should be done before i connect second server?

Hope for your response,

Thank you

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Connect to Multi-Server failed

Post by Support Team »

Hello IceballSHooter,

have you tried to connect to the two servers separately? If you can connect to both of them separately using a single session, you will also to be able to connect to both of them at the same time using two sessions.
Best regards
Unified Automation Support Team

IceballSHooter
Jr. Member
Jr. Member
Posts: 3
Joined: 04 Feb 2018, 10:21

Re: Connect to Multi-Server failed

Post by IceballSHooter »

Hi team,

Thanks for your reply, now i can connect two servers with different port number, i found before i using two servers with same port.

Now i have a question, do the ANSI C SDK support multi-thread? i want to connect and read/write those servers with different threads. Is that possible?

Thanks

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Connect to Multi-Server failed

Post by Support Team »

Hello IceballSHooter,

the AnsiC Client SDK is purely single threaded, so sessions can only be used from within the main thread. For more information, see:

http://documentation.unified-automation ... ssion.html
Best regards
Unified Automation Support Team

Post Reply