Del via


Application_Connect function

Header: #include <applibs/application.h>

Creates a socket that can communicate with a real-time capable application. The socket is created in a connected state, and may be used with the send() and recv() functions to transfer messages to and from the real-time capable application. The message format is similar to a datagram.

int Application_Connect(const char *componentId);

Parameters

  • componentId A pointer to a string that contains the component ID of the real-time capable application.

Errors

Returns -1 if an error is encountered and sets errno to the error value.

  • EINVAL: An invalid componentId was specified.

  • EACCES: The component ID of the real-time capable application was not listed in the AllowedApplicationConnections capability in the application manifest.

Any other errno may also be specified; such errors aren't deterministic and the same behavior might not be retained through system updates.

Return value

Returns the file descriptor of the socket, or -1 for failure, in which case errno is set to the error value.

Application manifest requirements

The application manifest of the current application must list the component ID of the real-time capable application in the AllowedApplicationConnections capability. In addition, the application manifest of the real-time capable application must list the component ID of the current application in the AllowedApplicationConnections capability.