Communication API > BS2_SetAutoConnection
Set auto connection.
If it is set, it automatically calls the connected callback function specified in BS2_SetDeviceEventListener after the socket connection from the device is accepted.
#include "BS_API.h" int BS2_SetAutoConnection(void* context, int enable);
context
: Contextenable
: Weather auto connection is enabled
If successfully done, BS_SDK_SUCCESS
will be returned. If there is an error, the corresponding error code will be returned.