Synchronous login version for afdal_session_login function.
This function works pretty much like afdal_session_login function but blocking the caller until login process have finished.
As you can observe this function doesn't require you to set handlers to perform a login request. This is because this function will not need to notify its caller asynchronously.
Here is an example:
As you can see, the code on this example is far more simple to understand and more linear than the example that can be found at afdal_session_login function.
This is mainly because the type of request method. In this case, synchronous request is being used, making caller to be blocked. Although there are some circumstances where Af-Arch synchronous programming is recommended (check afdal_session_login doc) it is usually not recommended.
The main question to note with this model is that making a request disables caller to keep on doing other things such as keep updated the interface while the process is going through.
You have to consider carefully what type of service invocation you will use for your Af-Arch application according to the interface requeriments. Again check afdal_session_login documentation for more info about this issue.
|user ||The user login to be used on session login request. |
|password ||The password for the given user. |
|kernel_hostname ||The hostname where af-kernel is located. |
|kernel_port ||The TCP port where af-kernel host is running.|
- Returns a AfDalNulData object which holds request status.