Is implementing multicasting easy? This would really only be useful for the server but I wan''t to ensure that latency isn''t significantly contributed by the server pipe being full. For example we have 21 players connected. Player one moves and his move is echoed to the other 20 players. Sending 20 packets from the server ties up its processor and reduces it''s available transmision space which could be better used for recieving data update for clients. In this case it might net a 95% reduction. How do i tell winsock to send to 20 IP address''s rather than doing 20 sends? Thanks Chris
1 reply to this topic
Moderators - Reputation: 9676
Posted 19 April 2000 - 04:33 PM
IPv4 multicasting occurs on class D addresses (126.96.36.199 - 240.0.0.0). In order to perform multicasting over IP you need to bind a datagram socket to a multicast address on a specified socket. The address should be specific to the application, the socket should be specific to the session. Then, provided that all clients are on multicast capable networks, all transmissions directed to that IP/socket combo can be recvfrom()''d by all clients. Of course, a great many networks are still not multi-cast routing capable. A single send is still going to a single IP address (the multicast address), but multiple computers are receiving the packets.