一款简单易用的基础网络通讯组件库。

HttpDmtpClientFactory 类

适用于基于HttpDmtpClient的DmtpRpc的连接工厂。

Definition

命名空间: TouchSocket.Dmtp
程序集: TouchSocketPro.Dmtp (在 TouchSocketPro.Dmtp.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
C#
public sealed class HttpDmtpClientFactory : HttpDmtpClientFactory<HttpDmtpClient>
Inheritance
Object    DisposableObject    DependencyObject    ClientFactoryHttpDmtpClient    ConnectableClientFactoryHttpDmtpClient    DmtpClientFactoryHttpDmtpClient    HttpDmtpClientFactoryHttpDmtpClient    HttpDmtpClientFactory

构造函数

HttpDmtpClientFactory初始化 HttpDmtpClientFactory 类的一个新实例

属性

AvailableCount 获取可用的客户端数量。

该值指示了当前空闲的客户端数量和未创建的客户端数量。


(继承自 ClientFactoryTClient。)
ConnectTimeout 连接超时设定
(继承自 ConnectableClientFactoryTClient。)
CreatedCount 获取已经创建的客户端数量。
(继承自 ClientFactoryTClient。)
DisposedValue 标识该对象是否已被释放
(继承自 DisposableObject。)
FreeCount 获取空闲的客户端数量。
(继承自 ClientFactoryTClient。)
GetConfig 获取传输的客户端配置
(继承自 ConnectableClientFactoryTClient。)
MaxCount 最大客户端数量。默认10。
(继承自 ClientFactoryTClient。)
MinCount 池中维护的最小客户端数量。默认0。
(继承自 ClientFactoryTClient。)

方法

Clear 清理池中的所有客户端。
(继承自 ClientFactoryTClient。)
Dispose 释放资源。内部已经处理了SuppressFinalize(Object)
(继承自 DisposableObject。)
DisposeClient 释放客户端最后的调用。
(继承自 ClientFactoryTClient。)
EqualsDetermines whether the specified object is equal to the current object.
(继承自 Object。)
GetClient 获取一个指定客户端,默认情况下等待1秒。
(继承自 ClientFactoryTClient。)
GetClient(TimeSpan) 获取用于传输的客户端结果。可以支持IDisposable
(继承自 DmtpClientFactoryTClient。)
GetClientIds 获取所有已创建客户端的Id。
(继承自 DmtpClientFactoryTClient。)
GetHashCodeServes as the default hash function.
(继承自 Object。)
GetTypeGets the Type of the current instance.
(继承自 Object。)
GetValueTValue 获取依赖注入的值,当没有注入时,会返回默认行为的值。
(继承自 DependencyObject。)
HasValueTValue 判断在当前对象中是否有已设置的属性值。
(继承自 DependencyObject。)
IsAlive 判断客户端是不是存活状态。
(继承自 DmtpClientFactoryTClient。)
RemoveValueTValue 移除属性值。
(继承自 DependencyObject。)
SetValueTValue 设置依赖注入的值,如果值已经存在,将被覆盖。
(继承自 DependencyObject。)
ToStringReturns a string that represents the current object.
(继承自 Object。)
TryGetValueTValue 尝试获取依赖注入的值,当没有注入时,会返回
(继承自 DependencyObject。)
TryRemoveValueTValue 尝试重置属性值,如果没有这个值,则返回
(继承自 DependencyObject。)

扩展方法

Map
(由 Mapper 定义。)
Map
(由 Mapper 定义。)
MapTTarget
(由 Mapper 定义。)
PullFileHttpDmtpClient 多线程拉取文件。

注意

  1. 如果返回正确结果,则无需其他动作。
  2. 如果返回其他结果,则当ResourceInfo不为空时,可能会尝试续传。


(由 TcpDmtpClientFactoryFileTransferExtension 定义。)
PullFileHttpDmtpClient 多线程从指定客户端拉取文件。

注意

  1. 使用该功能时,请确保已实现SetFindTransferIdsTClient(DmtpClientFactoryTClient, FuncString, String)
  2. 如果返回正确结果,则无需其他动作。
  3. 如果返回其他结果,则当ResourceInfo不为空时,可能会尝试续传。


(由 TcpDmtpClientFactoryFileTransferExtension 定义。)
PullFileAsyncHttpDmtpClient 多线程拉取文件。

注意

  1. 如果返回正确结果,则无需其他动作。
  2. 如果返回其他结果,则当ResourceInfo不为空时,可能会尝试续传。


(由 TcpDmtpClientFactoryFileTransferExtension 定义。)
PullFileAsyncHttpDmtpClient 多线程从指定客户端拉取文件。

注意

  1. 使用该功能时,请确保已实现SetFindTransferIdsTClient(DmtpClientFactoryTClient, FuncString, String)
  2. 如果返回正确结果,则无需其他动作。
  3. 如果返回其他结果,则当ResourceInfo不为空时,可能会尝试续传。


(由 TcpDmtpClientFactoryFileTransferExtension 定义。)
PushFileHttpDmtpClient 多线程推送文件。

注意

  1. 如果返回正确结果,则无需其他动作。
  2. 如果返回其他结果,则当ResourceInfo不为空时,可能会尝试续传。


(由 TcpDmtpClientFactoryFileTransferExtension 定义。)
PushFileHttpDmtpClient 多线程推送文件。

注意

  1. 使用该功能时,请确保已实现SetFindTransferIdsTClient(DmtpClientFactoryTClient, FuncString, String)
  2. 如果返回正确结果,则无需其他动作。
  3. 如果返回其他结果,则当ResourceInfo不为空时,可能会尝试续传。


(由 TcpDmtpClientFactoryFileTransferExtension 定义。)
PushFileAsyncHttpDmtpClient 多线程推送文件。

注意

  1. 如果返回正确结果,则无需其他动作。
  2. 如果返回其他结果,则当ResourceInfo不为空时,可能会尝试续传。


(由 TcpDmtpClientFactoryFileTransferExtension 定义。)
PushFileAsyncHttpDmtpClient 多线程推送文件。

注意

  1. 使用该功能时,请确保已实现SetFindTransferIdsTClient(DmtpClientFactoryTClient, FuncString, String)
  2. 如果返回正确结果,则无需其他动作。
  3. 如果返回其他结果,则当ResourceInfo不为空时,可能会尝试续传。


(由 TcpDmtpClientFactoryFileTransferExtension 定义。)
SetFindTransferIdsHttpDmtpClient 查找多路传输的id集合。

参数:

  1. 主客户端
  2. 目标主客户端Id
  3. 目标传输客户端Id集合,当没查到任何元素时,应当返回空数组。


(由 TcpDmtpClientFactoryFileTransferExtension 定义。)
ToJsonString 转换为Json
(由 SerializeConvert 定义。)

参见