Skip to main content

TcpAbort

Open topic with navigation CAPL Functions » TCP/IP API » TcpAbort
Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long TcpAbort( dword socket);

Method Syntax as Constructor

socket.Abort( dword socket);

Description

The function closes the TCP socket immediately and sends a reset flag (RST) to the remote socket. The aborted socket is no longer valid. In contrast to TcpClose and TcpShutdown, the connection is not closed by the regular FIN-ACK handshake. The OnTcpClose callback will be called on the remote socket.

Parameters

  • socket: The socket handle.

Return Values

  • WSA_INVALID_PARAMETER (87): The specified socket was invalid.
  • SOCKET_ERROR (-1): The function failed. Call IpGetLastError to get a more specific error code.

Example

Create TCP Client and Server Sockets