TCP \ IP Queries
#1
Posted 19 August 2009 - 07:59 AM
I want to develop a simple pc messenger application using TCP\IP protocol. I want to send a broadcast message to all the systems connected on LAN how can i do it and also how can i get all the IP address os all systems on LAN
#2
Posted 19 August 2009 - 04:48 PM
If you just have one message you write periodically you could use just the TCP/IP primitive VIs in a loop to write the same message to each recipient. (Or you could use UDP to broadcast.)
There is also a Simple Messaging Reference Library (STM) available. Personally I think these can give you a good idea of how things should work, but I don't know why anyone would use them instead of shared variables (since these already do the work for you).
#3
Posted 19 August 2009 - 04:58 PM
TCP does not support broadcasting as it requires a connection for each communication link, however UDP does allow for broadcasting to all systems on the local subnet. Each system listening just needs to open a UDP port at a known port number, and then you can broadcast a message using UDP to that given port number. (Send the UDP message to 255.255.255.255 for broadcasting.) You can send out a Discover or Ping message so that each system listening responds to the sender with its name and IP address. This wil provide a list of available systems to the sender.Hi All,
I want to develop a simple pc messenger application using TCP\IP protocol. I want to send a broadcast message to all the systems connected on LAN how can i do it and also how can i get all the IP address os all systems on LAN
You can check out the Asynchronous Message Communication (AMC) reference library which handles most of what you are asking for. It includes a Ping function which will discover all of the systems on the network which have the AMC listener enabled. This allows you to get a list of devices on the network so that you can send directed messages to each.
Senior Systems Engineer, Industrial Embedded - National Instruments
There's a reference design for that.
#4
Posted 19 August 2009 - 07:16 PM
TCP does not support broadcasting as it requires a connection for each communication link, however UDP does allow for broadcasting to all systems on the local subnet. Each system listening just needs to open a UDP port at a known port number, and then you can broadcast a message using UDP to that given port number. (Send the UDP message to 255.255.255.255 for broadcasting.) You can send out a Discover or Ping message so that each system listening responds to the sender with its name and IP address. This wil provide a list of available systems to the sender.
You can check out the Asynchronous Message Communication (AMC) reference library which handles most of what you are asking for. It includes a Ping function which will discover all of the systems on the network which have the AMC listener enabled. This allows you to get a list of devices on the network so that you can send directed messages to each.
If you use UDP and broadcasting you need to be aware that most switches will restrict UDP broadcasts to a single subnet. If you are in an environment where you may have multiple subnets the UDP broadcast scheme may not work in this environment. This has nothing to do with LabVIEW but rather how most networks and switches are configured.
Mark Yedinak - Certified LabVIEW Architect and LabVIEW Champion
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
#5
Posted 19 August 2009 - 07:31 PM
#6
Posted 19 August 2009 - 07:37 PM
Just look on the Web-Chat project by mine:
http://lavag.org/top...uss-eugen-graf/
I just downloaded it, tried it, and was going to suggest it!
LabVOOP may be a bit much for someone new to LabVIEW though...
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
#7
Posted 20 August 2009 - 12:46 AM
I just downloaded it, tried it, and was going to suggest it!
![]()
LabVOOP may be a bit much for someone new to LabVIEW though...
OFFTOP There is no much LVOOP, only a clever cluster, no more. So it's understandable by any.
TOTOP: So you may try to collect all connections into an array and send to all in a for-loop (if you use TCP) and send a broadcast to all if you use UDP (but without ack).












