DatagramSocketImpl.InterfaceConsts.IpMulticastIf 字段

定义

注意

This constant will be removed in the future version. Use Java.Net.SocketOption enum directly instead of this field.

设置要向其发送多播数据包的传出接口。

[Android.Runtime.Register("IP_MULTICAST_IF")]
[System.Obsolete("This constant will be removed in the future version. Use Java.Net.SocketOption enum directly instead of this field.", true)]
public const Java.Net.SocketOption IpMulticastIf = 16;
[<Android.Runtime.Register("IP_MULTICAST_IF")>]
[<System.Obsolete("This constant will be removed in the future version. Use Java.Net.SocketOption enum directly instead of this field.", true)>]
val mutable IpMulticastIf : Java.Net.SocketOption

字段值

Value = 16
属性

注解

设置要向其发送多播数据包的传出接口。 在具有多个网络接口的主机上非常有用,应用程序希望使用系统默认值以外的其他网络接口。 获取/返回 InetAddress。

对多播有效:DatagramSocketImpl

适用于 . 的 java.net.SocketOptions.IP_MULTICAST_IFJava 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于