Setting up a UDP server

Recommended Posts


I need to set up daqfactory as a server for udp to wait for a connection (just one) on a port, and then communicate back. Looking at the documentation this is what I have done.

1/ created a Ethernet server device with NO Ip address, port 44444 ( the listening port) and timeout 1000

2/ Opened the device with Device.UDPServer.InitComm() - this did not cause an an error

3/ Sit in a loop (with delays) waiting for anything to arrive on the device, and if so for now print it out. When something arrives I am hoping to get its IP address to reply to. I read with

response += device.UDPServer.Read(0) where response is a string

I'm not getting anything. I would like to ask whether this daqfactory sequence is ok. Are there any missing steps, or is it incorrect in any way?

Regards Tony

Link to comment
Share on other sites

DAQFactory does not support UDP, so it will never work. You can do a TCP server, but the thing connecting in would have to use TCP, not UDP. If you can do this, simply setup the port as you did in step 1, then click on Monitor and look and see if anything comes in.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.