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.1.2.0 (12.1.2.0)
语法 public void ConnectRemoteServer(
string ipAddress,
int port,
byte[] dtu = null
)
Public Sub ConnectRemoteServer (
ipAddress As String,
port As Integer,
Optional dtu As Byte() = Nothing
)
public:
void ConnectRemoteServer(
String^ ipAddress,
int port,
array<unsigned char>^ dtu = nullptr
)
member ConnectRemoteServer :
ipAddress : string *
port : int *
?dtu : byte[]
(* Defaults:
let _dtu = defaultArg dtu null
*)
-> unit
参数
- ipAddress
- 类型:SystemString
对方的Ip地址 - port
- 类型:SystemInt32
端口号 - dtu (Optional)
- 类型:SystemByte
使用自定义的DTU数据报文
参见