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
Connect to Multi-Server failed
Moderator: uasdkc
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: Connect to Multi-Server failed
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.
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
Unified Automation Support Team
-
- Jr. Member
- Posts: 3
- Joined: 04 Feb 2018, 10:21
Re: Connect to Multi-Server failed
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
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
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: Connect to Multi-Server failed
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
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
Unified Automation Support Team