TCP/UDP suggestions
I need to write a program that allows a user to have the option to connect directly to another user using TCP or have the option of using UDP to broadcast to all the other clients without connecting to them.
Is it possible to use UDP to broadcast to multiple users without specifying a IP address? How would you do this? Is it possible to have all the users run thier own server and at the same time also be able to recieve a broadcast from another user without them all being connected to a centralized server?
Thanks for any suggestions
December 05, 2003 09:42 AM
> Is it possible to use UDP to broadcast to multiple users without
> specifying a IP address? How would you do this? Is it possible to
> have all the users run thier own server and at the same time also
> be able to recieve a broadcast from another user without them all
> being connected to a centralized server?
yes, as long as all clients are on the same lan
> specifying a IP address? How would you do this? Is it possible to
> have all the users run thier own server and at the same time also
> be able to recieve a broadcast from another user without them all
> being connected to a centralized server?
yes, as long as all clients are on the same lan
Some networks permit "UDP subnet broadcasts", others don''t. You can calculate the subnet address as follows:
My-IP-Address Bitwise-XOR (Bitwise-NOT My-Subnet-Mask)
For example, if my IP address is 128.55.66.77 and my subnet mask is 255.255.255.0, then the subnet broadcast address is 128.55.66.255.
Alternately, you can look at IP-Multicast -- it''s gaining support, but it''s hit-and-miss as well.
My-IP-Address Bitwise-XOR (Bitwise-NOT My-Subnet-Mask)
For example, if my IP address is 128.55.66.77 and my subnet mask is 255.255.255.0, then the subnet broadcast address is 128.55.66.255.
Alternately, you can look at IP-Multicast -- it''s gaining support, but it''s hit-and-miss as well.
Matt Slot / Bitwise Operator / Ambrosia Software, Inc.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement