LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP conection with UDP.FP

Hello
I need to use UDP protokol to comunicate with an other aplication. For a point to start with, I downloaded the UDP.FP from the resource library. But I can not get the examples to work. When I start the udpwrite program, it starts and seems to work. Then I start the udp_read program, which should monitor the output of the read program. But I always get the error "Socket adress already in use".
When I only start the read program, this error does not appear, but no connection can be made, because there is no sender.
What can be the reason for this? Is it not allowed to make a UDP connection on the same machine?
I am using Windows 98SE, but I tested it allso on NT 4.0 with no sucess.

Hope, that someone can help me

Ste
phan
0 Kudos
Message 1 of 2
(3,279 Views)
I found it by myself:
When calling "UDPOpen" you can not use the same port for the sender and the receiver, when running both on the same machine.

Reading from a UDP Socket, the code uses the port number specified with the UDPOpen command.
When writing to a socket, the port number to write to is a parameter of UDPWrite. Here you must use the port number, to which the UDPRead is listening.

Thanks
Stephan
0 Kudos
Message 2 of 2
(3,279 Views)