Struct NetResponse
Namespace: Tool.Sockets.NetFrame
Assembly: Tool.Net.dll
请求服务器返回的数据包信息类(请务必回收资源!!!)
public readonly struct NetResponse : IDisposableImplements
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), 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)
Constructors
NetResponse(in Guid, bool, NetFrameState, Exception)
未完成时
public NetResponse(in Guid onlyId, bool isreply, NetFrameState state, Exception error)Parameters
onlyId Guid
isreply bool
state NetFrameState
error Exception
NetResponse(in IDataPacket)
完成后
public NetResponse(in IDataPacket packet)Parameters
packet IDataPacket
Properties
Array
当前消息携带的数据流
public ArraySegment<byte> Array { get; }Property Value
Bytes
当前消息携带的数据流
public Memory<byte> Bytes { get; }Property Value
Error
当前发生的异常
public Exception Error { get; }Property Value
IsReply
是否需要有回复消息
public bool IsReply { get; }Property Value
OnlyId
消息唯一ID
public Guid OnlyId { get; }Property Value
Span
当前消息携带的数据流
public Span<byte> Span { get; }Property Value
State
用于表示当前数据包的执行情况
public NetFrameState State { get; }Property Value
Text
数据包(文字类型的数据)
public string Text { get; }Property Value
Methods
Dispose()
回收资源
public void Dispose()