Howto Broadcast?

This is a discussion on Howto Broadcast? within the Windows Programming forums, part of the Platform Specific Boards category; Hi all, How to broadcast a message within a LAN using Winsock? Meaning how to send a message to every ...

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    162

    Unhappy Howto Broadcast?

    Hi all,

    How to broadcast a message within a LAN using Winsock? Meaning how to send a message to every machine in a local network without knowing their IP addresses, of course you do know the port you’re using. Like when games find all servers in a network without knowing they are there.
    We haven't inherited Earth from our parents; instead we have borrowed her from our children - old Indian saying.

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    You can use Internet Group Management Protocol to issue multicasts. There is some stuff at MSDN here or search google.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    162

    RE

    multicasts? isn't that diffrent from broadcast?

    I have heard that you can also use UDP, is that true? If so then how?
    We haven't inherited Earth from our parents; instead we have borrowed her from our children - old Indian saying.

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> multicasts? isn't that diffrent from broadcast?

    On IPv4 Class A, B and C addresses, filling the host fields with all "1"'s will "broadcast" to all listening stations on that network. A true "multicast" uses Class D adresses and can be made to do the same thing within a network.

    The bottom line really is that Class D addresses are problematic and there have been various suggestions as to the correct way forward. Broadcast, multicast you pay's your money and takes your choice.

    Searcg google for IPv4 address formats if you are interested in the details.

    With UDP there is no guarantee what you send will get to where you send it, and if it doesn't you will not be told. UDP is very crude, (read the RFC, (RFC-768) - it is only 3 pages! - most others have a table of contents longer than that!)
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #5
    Registered User
    Join Date
    Dec 2002
    Posts
    162
    Where is the RFC or (RFC-768) ??
    We haven't inherited Earth from our parents; instead we have borrowed her from our children - old Indian saying.

  6. #6
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Google

    There are dozens of sites that catalog internet RFC's - run the above search.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  7. #7
    Registered User
    Join Date
    Dec 2002
    Posts
    162
    Ok thanks
    We haven't inherited Earth from our parents; instead we have borrowed her from our children - old Indian saying.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Computing Trailing Zeros HOWTO
    By Snafuist in forum C Programming
    Replies: 4
    Last Post: 02-25-2009, 05:50 PM
  2. [C#] howto encrypth and decrypth a string value
    By Jelte in forum C# Programming
    Replies: 16
    Last Post: 09-20-2008, 06:29 AM
  3. Broadcast on the right interface in C#
    By mdoland in forum C# Programming
    Replies: 1
    Last Post: 02-08-2008, 07:04 PM
  4. how to broadcast a music?
    By simonleo27 in forum C Programming
    Replies: 1
    Last Post: 01-14-2007, 02:34 AM
  5. HowTo increase 1 value to the pointer and pass by ref?
    By Mathsniper in forum C Programming
    Replies: 10
    Last Post: 10-29-2005, 06:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21