Open topic with navigation CAPL Functions » TCP/IP API » TcpCloseDocumentation Index
Fetch the complete documentation index at: https://notevil.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
TcpClose
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
Method Syntax as Constructor
Description
The function closes the TCP socket. Upon successful completion the passed socket is no longer valid. In contrast to TcpShutdown the connection in each direction is closed and the resources for the socket in the stack are released. As soon as the socket has been successfully closed, an OnTcpClose event is initiated once on the remote station.Parameters
- socket: The socket to be closed.
Return Values
- 0: The function completed successfully.
- WSA_INVALID_PARAMETER (87): The specified socket was invalid.
- SOCKET_ERROR (-1): The function failed. Call IpGetLastError to get a more specific error code.