UdpClient.MulticastLoopback UdpClient.MulticastLoopback UdpClient.MulticastLoopback UdpClient.MulticastLoopback Property

定義

取得或設定 Boolean 值,指定輸出多點傳送封包是否會傳遞至傳送應用程式。Gets or sets a Boolean value that specifies whether outgoing multicast packets are delivered to the sending application.

public:
 property bool MulticastLoopback { bool get(); void set(bool value); };
public bool MulticastLoopback { get; set; }
member this.MulticastLoopback : bool with get, set
Public Property MulticastLoopback As Boolean

屬性值

如果 UdpClient 會接收輸出多點傳送封包,則為 true,否則為 falsetrue if the UdpClient receives outgoing multicast packets; otherwise, false.

範例

下列程式碼範例示範如何使用MulticastLoopback屬性。The following code example shows the use of the MulticastLoopback property.

static void GetSetMulticastLoopback( UdpClient^ u )
{
   // Deliver multicast packets back to the sending client.
   u->MulticastLoopback = true;
   Console::WriteLine(  "MulticastLoopback value is {0}", u->MulticastLoopback );
}
public static void GetSetMulticastLoopback(UdpClient u)
{
    // Deliver multicast packets back to the sending client.
    u.MulticastLoopback = true;
    Console.WriteLine("MulticastLoopback value is {0}",
        u.MulticastLoopback);
}

備註

多播是一種可擴充的方法, 可在網際網路上進行多對多通訊。Multicast is a scalable method for many-to-many communication on the Internet. 如果處理常式訂閱多播位址, 該進程傳送的任何封包都會被訂閱多播位址的其他每個處理常式所接收。If a process subscribes to a multicast address, any packets sent by that process are received by every other process that has subscribed to the multicast address.

適用於