nn::ac::CTR::CancelConnectAsync FunctionResult CancelConnectAsync();
None.
| Value | Description |
|---|---|
Result::IsSuccess |
Completed without error. |
ResultNotConnecting |
A connection is not being processed. |
ResultAlreadyConnecting |
A connection has already been processed and established. |
| A value other than the above. | Failed for reasons other than those given above. |
Cancels processing if an automatic connection process is under way.
When a process is canceled, this is indicated in the Result return value. The GetLastErrorCode function can get error codes that are equivalent to those for failures that occur when processes are canceled. Use the Result value to determine if the process was successfully canceled.
If the process is successfully canceled or if the connection finishes processing before the cancellation request is received, the nn::os::Event object passed to the ConnectAsync function is signaled. You can then call the GetConnectResult function to determine whether the process was canceled. If another thread calls this function while the Connect function is running, you can determine if the process was canceled based on the Connect return value.
The behavior of this function in SDK 1.x is different from that in SDK 2.x and later. For SDK 1.x, if this function is called when processing a connection request to AC via BG communications, ResultNotConnecting is returned.
For SDK 2.x and later, the device cancels its connection request and ResultSuccess is returned.
CONFIDENTIAL