CommunicationServerConnectRemoteServer 方法 |
新增一个主动连接的请求,将不会收到是否连接成功的信息,当网络中断及奔溃之后,会自动重新连接。
A new active connection request will not receive a message whether the connection is successful. When the network is interrupted and crashed, it will automatically reconnect.
命名空间:
HslCommunication.Core.Net
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.2.0.0 (12.2.0.0)
语法 public RemoteConnectInfo ConnectRemoteServer(
string ipAddress,
int port,
byte[] dtu = null
)
Public Function ConnectRemoteServer (
ipAddress As String,
port As Integer,
Optional dtu As Byte() = Nothing
) As RemoteConnectInfo
public:
RemoteConnectInfo^ ConnectRemoteServer(
String^ ipAddress,
int port,
array<unsigned char>^ dtu = nullptr
)
member ConnectRemoteServer :
ipAddress : string *
port : int *
?dtu : byte[]
(* Defaults:
let _dtu = defaultArg dtu null
*)
-> RemoteConnectInfo
参数
- ipAddress
- 类型:SystemString
对方的Ip地址 - port
- 类型:SystemInt32
端口号 - dtu (Optional)
- 类型:SystemByte
使用自定义的DTU数据报文
返回值
类型:
RemoteConnectInfo[缺少 "M:HslCommunication.Core.Net.CommunicationServer.ConnectRemoteServer(System.String,System.Int32,System.Byte[])" 的 <returns> 文档]
参见