08-11-2009 10:11 AM
I have a program that uses a UDP transmitter.
I use UDP because I specifically do not care if anyone is listening.
I use UDP OPEN with a specific port to get a CONN ID.
I use UDP WRITE with the conn ID and a specific DESTINATION IP and DESTINATION PORT when transmitting.
I use UDP CLOSE when the program quits.
This works fine - I can receive the data in the PXI box just fine.
QUESTION: If the receiver software is NOT running, does the UDP WRITE actually take up bandwidth on the net?
I can imagine that it might be spewing data out, without regard to whether anyone is listening.
I can also imagine that the receiver might post a signal saying "I'm listening", and the transmitter knows whether someone is listening or not, and doesn't transmit if no one is listening.
So, which is correct?
I'm trying to decide if I need to implement a transmitter on/off control.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-11-2009 10:14 AM
If someone is listening or not...UDP sends ![]()
You can use the TTL (Time to Live) option to set how far the communication should go.
Christian
08-11-2009 10:20 AM
TTL is a count of how many router levels it can pass through, right?
I can't find that option, but I'm not concerned with that in my case, as I'm on a local net anyway.
If it's actually wiggling the wires (and no one else can talk at that moment), that's what I need to know.
Thanks.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-11-2009 10:42 AM
When last I looked into UDP it does indeed "wiggle the wire" going out of the back of your PC. What you switch/router does after that is dependent on its configuration.
Note: I got out of low-level network stuff before switch were invented so take my words with a grain of salt.
I was directed to Proceess monitor ( the below utility) when X-shooting a nasty bug by NI Support. Amoung many other things it will show you UDP messages traffic.
Just trying to help,
Ben
08-11-2009 10:53 AM
Thanks Ben. I used SysInternals' stuff for a while. But that doesn't really tell you if it's wiggling the wires. It could be just OS calls that those tools are reporting (that would be reasonable).
I suppose I could contrive a test by starting a UDP transmission of umpteen megabytes on a net where there's already a TCP connection established. If I start the UDP transmission, then start a TCP transmission, and if the TCP takes a while to get done, I suppose the channel was busy.
OTOH, with dividing things into blocks, I don't think that tells me anything.
Christian seems certain.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-11-2009 10:59 AM
CoastalMaineBird wrote:...I suppose I could contrive a test by starting a UDP transmission of umpteen megabytes on a net ...
If your switch has an activity light, you maybe able to just watch that or if the switch shows network utilization....
Ben
08-12-2009 02:33 AM
You are right with TTL, the LV help says:
time-to-live specifies the number of routers, minus 1, to forward a datagram. The TTL value applies to all datagrams sent using this socket. The following table lists what action occurs to a multicast datagram when you specify a value for the TTL parameter. The default value is 1.
| >1 | Datagram is sent and routers forward it through TTL-1 layers. |
| 0 | Datagram remains on the host computer. |
| 1 | Datagram sent to every client on the same local subnet that subscribes to that IP address. Hubs/repeaters and bridges/switches forward the datagram. Routers do not forward the datagram if the TTL is 1. |
Christian