Device Function
dev_Listen()
Listen on all layers in the device.
#include "device.h"
LResult dev_Listen
(
LDevice device
);
| device | device to listen on |
dev_Listen() puts all layers in the device into listening state from the top down. After a successful call to dev_Listen(), the application can call dev_ListenCheck() to find out if the device has received a connect request.
If successful, dev_Listen() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if ((result = dev_Open(device)) < 0)
{
LOG("Open failure", dev_ErrorMessage(result));
}
else
{
if ((result = dev_Listen(device)) < 0)
{
LOG("Listen failure", dev_ErrorMessage(result));
}
}