AREthEstablishTCPConnection
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
dword AREthEstablishTCPConnection (); // form 1dword AREthEstablishTCPConnection (dword aepHandle); // form 2dword AREthEstablishTCPConnection (dword aepHandle, dword remoteIPv4Address); // form 3dword AREthEstablishTCPConnection (dword aepHandle, dword remoteIPv4Address, dword remotePort); // form 4dword AREthEstablishTCPConnection (dword aepHandle, byte remoteIPv6Address[]); // form 5long AREthEstablishTCPConnection (dword aepHandle, byte remoteIPv6Address[], dword remotePort); // form 6long AREthEstablishTCPConnection (dword aepHandle, IP_Endpoint remoteIPEndpoint); // form 7
Description
Establishes one or multiple database defined TCP connection(s).- Form 1: Establishes all TCP connections of this node (as TCP client)
- Form 2: Establishes all TCP connections of TCP client
- Form 3/5: Establishes all TCP connections of TCP client to specific TCP server
- Form 4/6: Establishes TCP connection of TCP client to specific TCP server
Parameters
- aepHandle: Source application endpoint, which initiates the connection(s). Has to be defined in the database.
- remotePort: Port on which the messages can be both sent and received.
- remoteIPv4Address: IPv4 address to which the connection should be established. IPv4 address can be converted with IPGetAdressAsNumber.
- remoteIPv6Address: IPv6 address to which the connection should be established. IPv6 address can be converted with IpGetAddressAsArray.
- remoteIPEndpoint: Object of type IP_Endpoint that contains the address/port of the remote endpoint.
Return Values
- 0: The function was successfully executed
- >0: Error code