public class UdpDmtp : UdpSessionBase, IUdpDmtp,
IServiceBase, ISetupConfigObject, IResolverConfigObject, IConfigObject, IDependencyObject,
IDisposableObject, IDisposable, ILoggerObject, IPluginObject, IResolverObject,
IClient, IDmtpActorObject
Public Class UdpDmtp
Inherits UdpSessionBase
Implements IUdpDmtp, IServiceBase, ISetupConfigObject, IResolverConfigObject,
IConfigObject, IDependencyObject, IDisposableObject, IDisposable, ILoggerObject,
IPluginObject, IResolverObject, IClient, IDmtpActorObject
type UdpDmtp =
class
inherit UdpSessionBase
interface IUdpDmtp
interface IServiceBase
interface ISetupConfigObject
interface IResolverConfigObject
interface IConfigObject
interface IDependencyObject
interface IDisposableObject
interface IDisposable
interface ILoggerObject
interface IPluginObject
interface IResolverObject
interface IClient
interface IDmtpActorObject
end
UdpDmtp | UdpDmtp类的构造函数。 初始化一个定时器,用于定期清理不活跃的客户端连接。 |
Config |
配置项
(继承自 SetupConfigObject。) |
DisposedValue |
标识该对象是否已被释放
(继承自 DisposableObject。) |
DmtpActor | 提供Dmtp协议的最基础功能件 |
IsClient |
在Udp中,该值没有意义,且可以自由赋值。
(继承自 UdpSessionBase。) |
LastReceivedTime |
最后一次接收到数据的时间
(继承自 UdpSessionBase。) |
LastSentTime |
最后一次发送数据的时间
(继承自 UdpSessionBase。) |
Logger |
日志记录器
(继承自 ConfigObject。) |
Monitor | (继承自 UdpSessionBase。) |
PluginManager |
插件管理器
(继承自 SetupConfigObject。) |
ProtectedDataHandlingAdapter |
数据处理适配器
(继承自 UdpSessionBase。) |
Protocol |
终端协议
(继承自 UdpSessionBase。) |
RemoteIPHost | (继承自 UdpSessionBase。) |
Resolver |
获取解析器实例。
(继承自 SetupConfigObject。) |
ServerName |
服务器名称
(继承自 ServiceBase。) |
ServerState |
服务器状态
(继承自 UdpSessionBase。) |
CloneTo |
将当前对象的依赖项克隆到目标对象中
(继承自 DependencyObject。) |
Dispose |
释放资源。内部已经处理了SuppressFinalize(Object) (继承自 DisposableObject。) |
Dispose(Boolean) |
处置资源
(重写 UdpSessionBaseDispose(Boolean)) |
DropMulticastGroup |
从组播组中退出。
(继承自 UdpSessionBase。) |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) |
GetHashCode | Serves as the default hash function. (继承自 Object。) |
GetType | Gets the Type of the current instance. (继承自 Object。) |
GetUdpDmtpClientAsync | 异步地通过终结点获取 IUdpDmtpClient 实例。 |
GetValueTValue |
获取依赖注入的值,当没有注入时,会返回默认行为的值。
(继承自 DependencyObject。) |
HasValueTValue |
判断在当前对象中是否有已设置的属性值。
(继承自 DependencyObject。) |
JoinMulticastGroup |
加入组播。
组播地址为 224.0.0.0 ~ 239.255.255.255,其中 224.0.0.0~224.255.255.255 不建议在用户程序中使用,因为它们一般都有特殊用途。 (继承自 UdpSessionBase。) |
LoadConfig |
加载配置
(重写 UdpSessionBaseLoadConfig(TouchSocketConfig)) |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) |
OnUdpReceived |
处理已接收到的数据。
(重写 UdpSessionBaseOnUdpReceived(UdpReceivedDataEventArgs)) |
OnUdpSending |
在UDP数据即将发送时触发插件。
如果当前类覆盖了父类的方法,则不会触发插件。
(继承自 UdpSessionBase。) |
PreviewBind |
在Socket初始化对象后,Bind之前调用。
可用于设置Socket参数。
父类方法可覆盖。
(继承自 UdpSessionBase。) |
ProtectedClearReceiver |
清除当前的UDP接收器对象。
(继承自 UdpSessionBase。) |
ProtectedCreateReceiver |
创建或获取一个UDP接收器对象。
(继承自 UdpSessionBase。) |
ProtectedDefaultSendAsync(ReadOnlyMemoryByte) |
异步发送只读字节内存到远程主机。
此方法提供了一种默认的发送方式,确保只有在可以发送且远程IP主机不为空时才尝试发送数据。
(继承自 UdpSessionBase。) |
ProtectedDefaultSendAsync(EndPoint, ReadOnlyMemoryByte) |
异步发送数据到指定的端点。
此方法用于封装实际的数据发送逻辑,在发送之前会进行必要的检查和调用事件处理程序,以确保数据的正确发送。
(继承自 UdpSessionBase。) |
ProtectedSendAsync(IListArraySegmentByte) |
异步安全发送数据方法。
本方法提供了一种安全的异步数据发送方式,确保在发送过程中,
使用了端点信息并且避免了潜在的空引用错误。
(继承自 UdpSessionBase。) |
ProtectedSendAsync(IRequestInfo) |
异步发送数据,使用提供的请求信息。
(继承自 UdpSessionBase。) |
ProtectedSendAsync(ReadOnlyMemoryByte) |
异步发送数据,使用提供的内存数据。
(继承自 UdpSessionBase。) |
ProtectedSendAsync(EndPoint, IListArraySegmentByte) |
异步发送数据到指定的端点。
(继承自 UdpSessionBase。) |
ProtectedSendAsync(EndPoint, ReadOnlyMemoryByte) |
异步发送数据到指定的端点。
该方法通过适配器转发数据,如果适配器未设置,则采用默认发送方式。
(继承自 UdpSessionBase。) |
ProtectedSendAsync(EndPoint, IRequestInfo) |
异步发送请求信息到指定的端点。
在发送之前,会检查是否具备发送请求信息的能力,并通过适配器进行发送。
(继承自 UdpSessionBase。) |
ReceivingData |
当收到原始数据时,处理数据。
该方法提供了一个机制,通过该机制可以对原始数据进行自定义处理,而不必修改具体的传输逻辑。
(继承自 UdpSessionBase。) |
RemoveValueTValue |
移除属性值。
(继承自 DependencyObject。) |
SetAdapter |
设置适配器
(继承自 UdpSessionBase。) |
SetupAsync |
异步配置设置项
(继承自 SetupConfigObject。) |
SetValueTValue |
设置依赖注入的值,如果值已经存在,将被覆盖。
(继承自 DependencyObject。) |
StartAsync |
异步启动
(继承自 UdpSessionBase。) |
StopAsync |
异步停止
(继承自 UdpSessionBase。) |
ThrowIfConfigIsNull |
如果Config为空,则抛出ArgumentNullException的异常。
(继承自 ConfigObject。) |
ThrowIfDisposed |
判断当前对象是否已经被释放。
如果已经被释放,则抛出ObjectDisposedException异常。
(继承自 DisposableObject。) |
ToString | Returns a string that represents the current object. (继承自 Object。) |
TryGetValueTValue |
尝试获取依赖注入的值,当没有注入时,会返回。
(继承自 DependencyObject。) |
TryRemoveValueTValue |
尝试重置属性值,如果没有这个值,则返回。
(继承自 DependencyObject。) |