MulticastOption Constructor (IPAddress^, IPAddress^)
.NET Framework (current version)
Initializes a new instance of the MulticastOption class with the specified IP multicast group address and local IP address associated with a network interface.
Assembly: System (in System.dll)
Parameters
- group
-
Type:
System.Net::IPAddress^
The group IPAddress.
- mcint
-
Type:
System.Net::IPAddress^
The local IPAddress.
| Exception | Condition |
|---|---|
| ArgumentNullException | group is null. -or- mcint is null. |
For machines with multiple network cards, you must use this constructor to create MulticastOption instances.
The following example creates a MulticastOption object.
// Define a MuticastOption object specifying the multicast group // address and the local IPAddress. // The multicast group address is the same one used by the server. mcastOption = gcnew MulticastOption( mcastAddress,localIPAddr ); mcastSocket->SetSocketOption( SocketOptionLevel::IP, SocketOptionName::AddMembership, mcastOption );
.NET Framework
Available since 1.1
Available since 1.1
Show: