Skip to main content
Open topic with navigation CAPL Functions » TCP/IP API » UdpClose

UdpClose

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long UdpClose( dword socket);

Method Syntax as Destructor

ssocket.Close()

Description

The function closes the UDP socket. Upon successful completion the passed socket is no longer valid.

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.

Example

See example Create UDP Server Sockets. UdpOpen