NetworkDoubleBaseSetPersistentConnection 方法 |
在读取数据之前可以调用本方法将客户端设置为长连接模式,相当于跳过了ConnectServer的结果验证,对异形客户端无效,当第一次进行通信时再进行创建连接请求。
Before reading the data, you can call this method to set the client to the long connection mode, which is equivalent to skipping the result verification of ConnectServer,
and it is invalid for the alien client. When the first communication is performed, the connection creation request is performed.
命名空间:
HslCommunication.Core.Net
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public void SetPersistentConnection()
Public Sub SetPersistentConnection
public:
void SetPersistentConnection()
member SetPersistentConnection : unit -> unit
示例
以下的方式演示了另一种长连接的机制
SetPersistentConnection示例
System.Threading.Thread.Sleep( 10000 );
OperateResult write = client.Write( "100", 123 );
参见