nfc_llcp_register_connection_listener()
Create a client or server LLCP connection listener.
Synopsis:
#include <nfc/nfc.h>
NFC_API nfc_result_t nfc_llcp_register_connection_listener(nfc_llcp_connection_type_t type, unsigned int sap, const char *service_name, nfc_llcp_connection_listener_t *listenerHandle)
Arguments:
- type
-
The connection type. You can use NFC_LLCP_CLIENT or NFC_LLCP_SERVER.
- sap
-
The service access point.
- service_name
-
The service name.
- listenerHandle
-
The returned handle associated with this listener.
Library:
libnfcDescription:
This function creates a listener for a client or server LLCP connection.
Returns:
NFC_RESULT_SUCCESS, or one of the following:
- NFC_RESULT_INVALID_PARAMETER: A parameter is invalid.
- NFC_RESULT_SERVICE_CONNECTION_ERROR: The application is not connected to the NFC system.
- NFC_RESULT_RESOURCE_BUSY: The specified SAP or service is already in use.
- NFC_RESULT_LIMITATION_EXCEEDED: Maximum number of socket registration has been reached.
- NFC_RESULT_OUT_OF_MEMORY: The system memory available for the NFC system to complete this operation is insufficient.