Results 1 to 5 of 5

Thread: Question concerning dilettante's Demo

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2015
    Posts
    900

    Question concerning dilettante's Demo

    Hello
    Here is dilettante's Demo about UDP.
    http://www.vbforums.com/showthread.p...=1#post4494103
    I was using TCP/IP via Winsock but I found this demo and I tested it.
    It is working perfectly on a single machine.
    I'm asking how to make it connect two machines.
    Where Am I going to input the IP of the other machine?
    thank you for any help

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Question concerning dilettante's Demo

    Since the entire point was to make use of UDP broadcasts there isn't any way to put in specific IP addresses.

    UDP broadcasts are not routable so most of the time they only work between machines on the same physical or logical network segment (on the same cable, hub, or switch). If your network contains bridges or routers these will normally be barriers to such broadcasts. They almost have to be or else the Internet would be choked by everyone's broadcasts.

    We don't have good support for UDP multicast so that's out. That leaves you with UDP unicast, where the sender specifies the destination IP on each send. If there are NAT routers involved then you have to do port mapping on machines behind such routers or else sit such machines naked to the Internet (usually NAT routers have some sort of "DMZ machine" configuration option).

    The DMZ host feature allows one local host to be exposed to the Internet for a special-purpose service such as Internet gaming or video conferencing. The Router forwards packets of all services to the DMZ host. When a PC is set to be DMZ host, it's better to disable its DHCP client function and set a new static IP address to it, because its IP Address may be changed when using the DHCP function.

    Remember, with UDP there are no "connections" anyway. It is connectionless, which is the major thing that makes it "not TCP." So saying you want to "connect using UDP" is nonsense. This is not merely semantics because until you learn to use the right words you can never make sense of documentation or anything we might tell you. "Reading is FUNdamental!"


    Perhaps you could describe what you are trying to accomplish. Then people could make suggestions.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2015
    Posts
    900

    Re: Question concerning dilettante's Demo

    UDP broadcasts are not routable so most of the time they only work between machines on the same physical or logical network segment (on the same cable, hub, or switch)
    Very interesting
    Thank you very much

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Question concerning dilettante's Demo

    I forgot to mention that software firewalls on receiving machines need to be given rules to permit inbound UDP traffic port by port too.

  5. #5
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: Question concerning dilettante's Demo

    I thought multicast was as simple as using setsockopt? Although I've actually never tested it - I have some snippets saved somewhere.

    Here's one from a quick google --> https://planet-source-code.com/vb/sc...29005&lngWId=1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width