Broadcast on different subnets


New Member
Please if you can help me about my problem. On one side I have server with IP connected to the WAN interface of router ...Then on wireless LAN of my router I have connected a few clients. Now I will write code in C where client are requesting some UDP streams from server, then server broadcasts streams to clients, and if some packets get lost clients must send NACK to server. My questions is: Because server and clients are on different subnets how can I broadcast from server? And how the client can send request and NACKs to server because they are in different subnets? Are these problems can be solved by router configurations or in C code?

Thank you for helping


Thành viên BQT
You cannot broadcast to different subnets. Routers do not usually forward broadcast packets to different subnets, unless you have a very special router that can be configured properly (e.g. Cisco ...). You could however use multicast for such a task. Here's a C example

NOTE: some includes in the c example are missing, but they are easy to find

Từ khóa phổ biến

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.