点击或拖拽改变大小

MqttSyncClientPool 类

[商业授权] MqttSyncClient客户端的连接池类对象,用于共享当前的连接池,合理的动态调整连接对象,然后进行高效通信的操作,默认连接数无限大。
[Authorization] The connection pool class object of the MqttSyncClient is used to share the current connection pool, reasonably dynamically adjust the connection object, and then perform efficient communication operations, The default number of connections is unlimited
继承层次
SystemObject
  HslCommunication.MQTTMqttSyncClientPool

命名空间:  HslCommunication.MQTT
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法
public class MqttSyncClientPool

MqttSyncClientPool 类型公开以下成员。

构造函数
  名称说明
公共方法MqttSyncClientPool(MqttConnectionOptions)
通过MQTT连接参数实例化一个对象
Instantiate an object through MQTT connection parameters
公共方法MqttSyncClientPool(MqttConnectionOptions, ActionMqttSyncClient)
通过MQTT连接参数以及自定义的初始化方法来实例化一个对象
Instantiate an object through MQTT connection parameters and custom initialization methods
Top
属性
  名称说明
公共属性GetMqttSyncConnectPool
获取当前的连接池管理对象信息
Get current connection pool management object information
公共属性MaxConnector
获取或设置最大的连接数,当实际的连接数超过最大的连接数的时候,就会进行阻塞,直到有新的连接对象为止。
Get or set the maximum number of connections. When the actual number of connections exceeds the maximum number of connections, it will block until there is a new connection object.
Top
方法
  名称说明
公共方法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。)
受保护的方法MemberwiseClone
Creates a shallow copy of the current Object.
(继承自 Object。)
公共方法Read
从MQTT服务器同步读取数据,将payload发送到服务器,然后从服务器返回相关的数据,支持数据发送进度报告,服务器执行进度报告,接收数据进度报告操作
Synchronously read data from the MQTT server, send the payload to the server, and then return relevant data from the server, support data transmission progress report, the server executes the progress report, and receives the data progress report
公共方法ReadAsync
从MQTT服务器同步读取数据,将payload发送到服务器,然后从服务器返回相关的数据,支持数据发送进度报告,服务器执行进度报告,接收数据进度报告操作
Synchronously read data from the MQTT server, send the payload to the server, and then return relevant data from the server, support data transmission progress report, the server executes the progress report, and receives the data progress report
公共方法ReadRetainTopics
读取服务器的已经驻留的所有消息的主题列表
Read the topic list of all messages that have resided on the server
公共方法ReadRetainTopicsAsync
读取服务器的已经驻留的所有消息的主题列表
Read the topic list of all messages that have resided on the server
公共方法ReadRpcT(String, Object)
读取MQTT服务器注册的RPC接口,忽略返回的Topic数据,直接将结果转换为泛型对象,如果JSON转换失败,将返回错误,参数传递主题和数据负载, 数据负载示例:new { address = "", length = 0 } 本质是一个匿名对象。
Read the RPC interface registered by the MQTT server, ignore the returned Topic data, and directly convert the result into a generic object. If the JSON conversion fails, an error will be returned. The parameter passes the topic and the data payload. The data payload example: new { address = "", length = 0 } is essentially an anonymous object.
公共方法ReadRpcT(String, String)
读取MQTT服务器注册的RPC接口,忽略返回的Topic数据,直接将结果转换为泛型对象,如果JSON转换失败,将返回错误,参数传递主题和数据负载, 数据负载示例:"{\"address\": \"100\",\"length\": 10}" 本质是一个字符串。
Read the RPC interface registered by the MQTT server, ignore the returned Topic data, and directly convert the result into a generic object. If the JSON conversion fails, an error will be returned. The parameter passes the topic and the data payload. The data payload example: "{\"address\ ": \"100\",\"length\": 10}" is essentially a string.
公共方法ReadRpcApiLog
读取服务器的指定的API接口的每天的调用次数,如果API接口不存在,或是还没有调用数据,则返回失败。
Read the number of calls per day of the designated API interface of the server. If the API interface does not exist or the data has not been called yet, it returns a failure.
公共方法ReadRpcApiLogAsync
读取服务器的指定的API接口的每天的调用次数,如果API接口不存在,或是还没有调用数据,则返回失败。
Read the number of calls per day of the designated API interface of the server. If the API interface does not exist or the data has not been called yet, it returns a failure.
公共方法ReadRpcApis
读取服务器的已经注册的API信息列表,将返回API的主题路径,注释信息,示例的传入的数据信息。
Read the registered API information list of the server, and return the API subject path, annotation information, and sample incoming data information.
公共方法ReadRpcApisAsync
读取服务器的已经注册的API信息列表,将返回API的主题路径,注释信息,示例的传入的数据信息。
Read the registered API information list of the server, and return the API subject path, annotation information, and sample incoming data information.
公共方法ReadRpcAsyncT(String, Object)
读取MQTT服务器注册的RPC接口,忽略返回的Topic数据,直接将结果转换为泛型对象,如果JSON转换失败,将返回错误,参数传递主题和数据负载, 数据负载示例:new { address = "", length = 0 } 本质是一个匿名对象。
Read the RPC interface registered by the MQTT server, ignore the returned Topic data, and directly convert the result into a generic object. If the JSON conversion fails, an error will be returned. The parameter passes the topic and the data payload. The data payload example: new { address = "", length = 0 } is essentially an anonymous object.
公共方法ReadRpcAsyncT(String, String)
读取MQTT服务器注册的RPC接口,忽略返回的Topic数据,直接将结果转换为泛型对象,如果JSON转换失败,将返回错误,参数传递主题和数据负载, 数据负载示例:"{\"address\": \"100\",\"length\": 10}" 本质是一个字符串。
Read the RPC interface registered by the MQTT server, ignore the returned Topic data, and directly convert the result into a generic object. If the JSON conversion fails, an error will be returned. The parameter passes the topic and the data payload. The data payload example: "{\"address\ ": \"100\",\"length\": 10}" is essentially a string.
公共方法ReadString
从MQTT服务器同步读取数据,将指定编码的字符串payload发送到服务器,然后从服务器返回相关的数据,并转换为指定编码的字符串,支持数据发送进度报告,服务器执行进度报告,接收数据进度报告操作
Synchronously read data from the MQTT server, send the specified encoded string payload to the server, and then return the data from the server, and convert it to the specified encoded string, support data transmission progress report, the server executes the progress report, and receives the data progress report
公共方法ReadStringAsync
从MQTT服务器同步读取数据,将指定编码的字符串payload发送到服务器,然后从服务器返回相关的数据,并转换为指定编码的字符串,支持数据发送进度报告,服务器执行进度报告,接收数据进度报告操作
Synchronously read data from the MQTT server, send the specified encoded string payload to the server, and then return the data from the server, and convert it to the specified encoded string, support data transmission progress report, the server executes the progress report, and receives the data progress report
公共方法ReadTopicPayload
读取服务器的已经驻留的指定主题的消息内容
Read the topic list of all messages that have resided on the server
公共方法ReadTopicPayloadAsync
读取服务器的已经驻留的指定主题的消息内容
Read the topic list of all messages that have resided on the server
公共方法ToString
Returns a string that represents the current object.
(重写 ObjectToString.)
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
备注
本连接池用于提供高并发的读写性能,仅对商业授权用户开放。使用起来和MqttSyncClient一致,但是更加的高性能,在密集型数据交互时,优势尤为明显。
参见