wclRfCommServerConnectionListen(Guid, String, Byte, Boolean, Boolean) Method |
The method starts listening for client connections.
Namespace: wclBluetoothAssembly: wclBluetoothFramework (in wclBluetoothFramework.dll) Version: 7.17.12.0 (7.17.12.0)
Syntax public int Listen(
Guid Service,
string ServiceName = "",
byte Channel = 0,
bool Authentication = true,
bool Encryption = false
)
Public Function Listen (
Service As Guid,
Optional ServiceName As String = "",
Optional Channel As Byte = 0,
Optional Authentication As Boolean = true,
Optional Encryption As Boolean = false
) As Integer
public:
int Listen(
Guid Service,
String^ ServiceName = L"",
unsigned char Channel = 0,
bool Authentication = true,
bool Encryption = false
)
Parameters
- Service Guid
- The Bluetooth Service UUID. If the Channel
parameter is zero, the system attempts to use Service to
resolve the remote channel corresponding to the service. The service
class is a normalized 128-bit GUID, defined by the Bluetooth
specification. Common GUIDs are defined by the Bluetooth Assigned
Numbers document. Alternatively, a unique GUID may be used for a
domain-specific application.
- ServiceName String (Optional)
- The option service name.
- Channel Byte (Optional)
- The RFCOMM channel number. If zero the
Service UUID will be used.
- Authentication Boolean (Optional)
- Specifies that authentication is required
for a connect operation to complete successfully. Setting this option
actively initiates authentication during connection establishment,
if the two Bluetooth devices were not previously
authenticated.
- Encryption Boolean (Optional)
- The option enforces encryption to establish a
connection. Encryption is only available for authenticated
connections.
Return Value
Int32 If the function succeed the return value is
WCL_E_SUCCESS. Otherwise the method returns one of
the WCL error codes.
Remarks NOTE: BlueSoleil has limited support for Authentication
and Encryption.. Also it doe snot support user-defined RFCOMM
channel number.
See Also