Documentation Index
Fetch the complete documentation index at: https://notevil.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
IpGetSocketName
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
long IpGetSocketName( dword socket, dword &ipv4Address, dword &port); // form 1long IpGetSocketName( dword socket, byte ipv6Address[], dword &port); // form 2long IpGetSocketName( dword socket, IP_Endpoint localEndpoint ); // form 3
Method Syntax
socket.GetSocketName(dword &ipv4Address, dword &port); // form 1socket.GetSocketName(byte ipv6Address[], dword &port); // form 2socket.GetSocketName(IP_Endpoint localEndpoint); // form 3
Description
The function returns the local bound address and port of a socket.Parameters
- socket: The socket handle.
- ipv4Address: The numerical IPv4 address is returned in this variable.
- Ipv6Address: A 16 byte array to return the IPv6 address.
- port: The local bound port.
- localEndpoint: IP_Endpoint variable, where the address and port of the local endpoint is copied to.
Return Values
- 0: The function completed successfully.
- WSA_INVALID_PARAMETER (87): The specified socket index was invalid.
- SOCKET_ERROR (-1): The function failed. Call IpGetLastSocketError to get a more specific error code.