Class UdpEndPoint
Namespace: Tool.Sockets.UdpHelper
Assembly: Tool.Net.dll
Udp通信专属模块
public class UdpEndPoint : EndPointInheritance
object ← EndPoint ← UdpEndPoint
Inherited Members
EndPoint.Create(SocketAddress), EndPoint.Serialize(), EndPoint.AddressFamily, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Extension Methods
ObjectExtension.Add<T>(object, object, object), ObjectExtension.CopyEntity(object, object, params string[]), ObjectExtension.EntityToJson(object), ObjectExtension.EntityToJson(object, bool), ObjectExtension.EntityToJson(object, bool, string), DictionaryExtension.GetDictionary(object), TypeExtension.GetFieldKey(object, string, out bool), TypeExtension.GetFieldKey<T>(object, string, out bool), TypeExtension.GetFieldKey(object, Type, string, out bool), ObjectExtension.GetIntPtr(object), ObjectExtension.GetIntPtrInt(object), TypeExtension.GetPropertieFind(object, string, bool), TypeExtension.GetProperties(object), TypeExtension.GetPropertyKey(object, string, out bool), TypeExtension.GetPropertyKey<T>(object, string, out bool), TypeExtension.GetPropertyKey(object, Type, string, out bool), TypeExtension.GetValue(object, PropertyDescriptor), TypeExtension.GetValue(object, string, bool), TypeExtension.GetValue(object, string), ObjectExtension.Read<T>(object, object, int, int), ObjectExtension.Read<T>(object, int, object, int, int), DictionaryExtension.SetDictionary(object, IDictionary<string, object>), TypeExtension.SetFieldKey(object, string, object), TypeExtension.SetFieldKey<T>(object, string, object), TypeExtension.SetFieldKey(object, Type, string, object), TypeExtension.SetPropertyKey(object, string, object), TypeExtension.SetPropertyKey<T>(object, string, object), TypeExtension.SetPropertyKey(object, Type, string, object), TypeExtension.SetValue(object, PropertyDescriptor, object), TypeExtension.SetValue(object, string, object, bool), TypeExtension.SetValue(object, string, object), ObjectExtension.ToBase64String(object), ObjectExtension.ToBytes(object), ObjectExtension.ToBytes(object, out Type), DictionaryExtension.ToDictionary(object), DictionaryExtension.ToDictionary<T>(object), DictionaryExtension.ToIDictionary(object), DictionaryExtension.ToIDictionary<T>(object), ObjectExtension.ToJson(object), ObjectExtension.ToJson(object, JsonSerializerOptions), ObjectExtension.ToJsonWeb(object), ObjectExtension.ToJsonWeb(object, Action<JsonSerializerOptions>), ObjectExtension.ToTryVar<T>(object, T), ObjectExtension.ToVar<T>(object), ObjectExtension.ToVar(object, Type, bool), ObjectExtension.ToVar(object, string), ObjectExtension.ToXml(object)
Remarks
代码由逆血提供支持
Constructors
UdpEndPoint(IPAddress, ushort)
创建一个Udp通信IP地址
public UdpEndPoint(IPAddress address, ushort port)Parameters
address IPAddress
port ushort
Properties
Address
IP地址信息
public IPAddress Address { get; }Property Value
AddressFamily
IP地址类型
public override AddressFamily AddressFamily { get; }Property Value
Ipv4
获取IpV4地址信息
public Ipv4Port Ipv4 { get; }Property Value
Port
通信端口
public ushort Port { get; }Property Value
Methods
Create(SocketAddress)
根据数据获取
public override EndPoint Create(SocketAddress socketAddress)Parameters
socketAddress SocketAddress
Returns
Exceptions
Equals(object)
判断是否一致
public override bool Equals(object obj)Parameters
obj object
比较值
Returns
是或否
Equals(UdpEndPoint)
判断是否一致
public bool Equals(UdpEndPoint other)Parameters
other UdpEndPoint
比较值
Returns
是或否
GetHashCode()
获取哈希值
public override int GetHashCode()Returns
Serialize()
获取
public override SocketAddress Serialize()Returns
ToString()
默认信息
public override string ToString()Returns
TryParse(string, int, out UdpEndPoint)
尝试判断是否可用的IP端口信息
public static bool TryParse(string ip, int port, out UdpEndPoint point)Parameters
ip string
IP信息
port int
端口信息
point UdpEndPoint
返回的可用对象
Returns
是否成功
Exceptions
失败的信息
Operators
operator ==(UdpEndPoint, UdpEndPoint)
指示两个 结构是否相等。
public static bool operator ==(UdpEndPoint a, UdpEndPoint b)Parameters
相等运算符左侧的结构
相等运算符右侧的结构
Returns
如果 true 等于 a,则为 b;否则为 false。
operator !=(UdpEndPoint, UdpEndPoint)
指示两个 结构是否不相等。
public static bool operator !=(UdpEndPoint a, UdpEndPoint b)Parameters
不等运算符左侧的结构
不等运算符右侧的结构
Returns
如果 true 不等于 a,则为 b;否则为 false。