Specifying the username and/or hostname for checkouts is particularly useful when all checkouts occur from the same machine, but you want to do user-specific checkouts. To set the username and hostname, you use LMX_OPT_CUSTOM_USERNAME and LMX_OPT_CUSTOM_HOSTNAME, respectively, as described in LMX_SetOption.
A primary use for specifying username and hostname is when you are using a web server or other types of application servers. For example, by default, if the application is located on a web server and the client is a web browser, every license will be consumed by the same user (the web server), instead of a license being consumed for each individual client. This causes a problem when you want to make reservations or perform other actions that rely on the username or hostname.
You can override this behavior by specifying a custom username and hostname that is unique for all sessions, just like a normal user account. This will result in a license being consumed by a unique user every time a client logs in from a browser.
The LMX_OPT_CUSTOM_USERNAME and LMX_OPT_CUSTOM_HOSTNAME options can be set only once. If you try to set them more than once, you will get the error LMX_INVALID_PARAMETER. If you need to use multiple usernames/hostnames inside one application, you must use separate LM-X clients.