Skip to main content

TCPGetRemoteAddressAsString

CAPL Functions » TCP/IP API » TCPGetRemoteAddressAsString Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long TcpGetRemoteAddressAsString(dword socket, char buffer[], dword size);

Description

This function retrieves the remote address of the specified connected socket in Internet standard dotted-decimal format.

Parameters

  • socket: The socket handle.
  • buffer: The buffer used to store the converted address.
  • size: The size of the address buffer.

Return Values

  • 0: The function completed successfully.
  • 1: The provided buffer is too small.
  • 2: Anything else failed (e.g. wrong socket parameter).

Example

TcpAcceptTcpConnect