public abstract class ReconnectionPlugin<TClient> : PluginBase
where TClient : IDisposableObject, IConnectableClient, IOnlineClient, ILoggerObject
Public MustInherit Class ReconnectionPlugin(Of TClient As {IDisposableObject, IConnectableClient, IOnlineClient, ILoggerObject})
Inherits PluginBase
[<AbstractClassAttribute>]
type ReconnectionPlugin<'TClient when 'TClient : IDisposableObject and IConnectableClient and IOnlineClient and ILoggerObject> =
class
inherit PluginBase
end
[缺少 "T:TouchSocket.Sockets.ReconnectionPlugin`1" 的 <typeparam name="TClient"/> 文档]
ActionForCheck | 每个周期可执行的委托。用于检验客户端活性。返回true表示存活,返回 |
ActionForConnect | ActionForConnect |
DisposedValue |
标识该对象是否已被释放
(继承自 DisposableObject。) |
PluginManager |
插件管理器
(继承自 PluginBase。) |
Tick | 检验时间间隔 |
Dispose |
释放资源。内部已经处理了SuppressFinalize(Object) (继承自 DisposableObject。) |
Dispose(Boolean) |
处置资源
(重写 DisposableObjectDispose(Boolean)) |
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。) |
Loaded |
在插件被成功添加在IPluginManager时执行。
(重写 PluginBaseLoaded(IPluginManager)) |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) |
SetActionForCheck(FuncTClient, Int32, NullableBoolean) | 设置每个周期执行的委托。用于判断客户端是否存活。如果返回True,表示客户端存活。返回False,表示客户端失活,需要立即重连。返回null,则表示跳过此次检查。 |
SetActionForCheck(FuncTClient, Int32, TaskNullableBoolean) | 设置一个周期性执行的委托,用于检查客户端状态。 |
SetConnectAction(FuncTClient, Boolean) | 设置连接动作 |
SetConnectAction(FuncTClient, TaskBoolean) | 设置连接动作 |
SetConnectAction(TimeSpan, FuncTClient, Int32, Exception, Boolean, ActionTClient) | 设置连接动作 |
SetConnectAction(Int32, Boolean, Int32, ActionTClient) | 设置连接动作 |
ThrowIfDisposed |
判断当前对象是否已经被释放。
如果已经被释放,则抛出ObjectDisposedException异常。
(继承自 DisposableObject。) |
ToString | Returns a string that represents the current object. (继承自 Object。) |
Unloaded |
在插件被Remove(IPlugin)时执行。
(继承自 PluginBase。) |
UsePolling | 使用轮询保持活性。 |
Map | (由 Mapper 定义。) |
Map | (由 Mapper 定义。) |
MapTTarget | (由 Mapper 定义。) |
ToJsonString |
转换为Json
(由 SerializeConvert 定义。) |