Documentation

xPCCloseConnection

Close TCP/IP communication connection

Prototype

void xPCCloseConnection(int port);

Arguments

port

Enter the value returned by the function xPCOpenTcpIpPort.

Description

The xPCCloseConnection function closes the TCP/IP communication channel opened by xPCOpenTcpIpPort, or xPCOpenConnection. Unlike xPCClosePort, it preserves the connection information. A subsequent call to xPCOpenConnection succeeds without the need to resupply communication data such as the IP address or port number. To close the communication channel completely, call xPCDeRegisterTarget. Calling the xPCCloseConnection function followed by calling xPCDeRegisterTarget is equivalent to calling xPCClosePort.

Note

RS-232 communication type has been removed. Configure TCP/IP communication instead.

Introduced before R2006a

Was this topic helpful?