forked from electronicarts/CnC_Generals_Zero_Hour
-
Notifications
You must be signed in to change notification settings - Fork 170
Open
Labels
EnhancementIs new feature or requestIs new feature or requestNetworkAnything related to network, serversAnything related to network, servers
Description
Currently, broadcasts use 255.255.255.255 regardless of user IP selection. Update the network code so broadcasts are sent using the subnet's broadcast address for the user-selected IP/interface from the options menu. This will improve LAN discovery and reliability when multiple network adapters are present.
Tasks:
- Send broadcasts to the subnet broadcast address for the selected interface, not 255.255.255.255.
- Ensure incoming broadcast packets are only received on the user-selected interface/subnet (bind sockets to the chosen IP).
- Gate this new behavior behind
RETAIL_COMPATIBLE_NETWORKINGto preserve legacy compatibility. - Tie broadcast addressing and receiving logic to the chosen network interface in options.
- Update initialization and sending/receiving logic accordingly.
Example:
- Selected IP: 192.168.0.50, Mask: 255.255.255.0
- Broadcast = (IP & Mask) | ~Mask = 192.168.0.255
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
EnhancementIs new feature or requestIs new feature or requestNetworkAnything related to network, serversAnything related to network, servers