Ticket #3939 (closed Feature Requests: fixed)
Determination on wither ip::address is a multicast address
|Reported by:||mccoryWork@…||Owned by:||chris_kohlhoff|
|Milestone:||To Be Determined||Component:||asio|
An ip::address can be created by either an IPv4 or IPv6 address. Once created the address is used for subsequent asio classes and function calls independently of the original format of the IP address. It is not currently possible to ask the class if the address is a multicast address. This means a user must determine the format of the address and then call "is_multicast" on the underlying class. In the "boost_asio/example/multicast/receiver.cpp" example, there isn't a way to validate if the receiver class was passed a multicast address, for the "join_group" function, without accessing the underlying IP type.
Both the ip::address_v4 and ip::address_v6 classes can tell if the IP address is a multicast address. I suggest placing a "is_multicast" function in the ip::address class that calls the underlying class's "is_multicast" function.