07-05-2017 03:55 PM - edited 07-05-2017 03:59 PM
Hello.
I need to listen a specific port, but two different devices transmit to this port at the same time. Two network cards are used to listen.
I want to specify from what IP I want to listen at specific time.
Here is flow:
1. Open UDP socket for port 30004 on IP 198.150.60.1
2. Read data
3. Close socket
Do steps 1-3 but using IP 198.150.60.2
My issue now is, when I try to input net address to UDP open it gives error 54. But it works perfect if I just open UDP for the port without IP address.
Help for UDP open explains that net port input is used to specify specific network you wan tot listen. Am I missing something?
Thank you
Solved! Go to Solution.
07-05-2017 04:01 PM
I resolved this issue.
I was using IP address of the sender. You have to use IP address of the local network card.
07-05-2017 04:43 PM
The UDP Read function returns the IP address where the message originated. UDP Open IP address is to specify which network card on the local machine you want to use for listening or broadcasting.