website logo
⌘K
Getting Started
Introduction
Basic Concepts
Opening an Account
Creating & Configuring Products
Integrating SDK and Configuring License Fulfillment
Activate a Key-Based License
Vendor Platform
Issuing New Licenses
License Detail View
Order Detail View
Customer Detail View
Metadata
Analytics
Settings
Product Configuration
Product Features
Product Custom Fields
Product Versioning
License Policies
Product Bundles
License Entitlements
License Types
Activations & Device Transfers
Features
Custom Fields
License Start Date
License Note
Maintenance Period
Trial Licenses
Floating Licenses
License Activation Types
Portals
End-User Portal
Offline Portal
Air-Gapped Portal
License API
License API Authorization
License Activation/Deactivation
License Check
Consumption
Floating
Trial Key
Product Details
Device Variables
Changing Password
Management API
Making API Requests
Management API Authorization
Customer
Product
Order
License
Device
Analytics
SDKs
Tutorials
.NET/C# SDK
.NET/C# Management SDK
C++ SDK
Java SDK
Python SDK
Go SDK
Delphi SDK
Swift/Objective-C SDK
Android SDK
Unity SDK
Errors and Response Codes
Floating Server
API Reference
Deployment
Configuration
Floating Server UI
Securing the Server
Whitelabeling
FAQ
Floating Server Changelog
Integrations
Salesforce
FastSpring
Stripe
Shopify
Common Scenarios
Single Sign On (SSO)
Glossary
General
SDK Glossary
Vendor Platform
Product Configuration Glossary
License Configuration
Postman Collections
Frequently Asked Questions
Changelog
License API changelog
Platform changelog
Docs powered by
Archbee
SDKs
...
Tutorials
Advanced Usage

Floating Server Usage

15min

Distributing software applications designed for closed networks comes with numerous obstacles.

Challenges include implementing node locking on virtual machines and activating licenses meant for devices with strict security demands, often in the absence of internet connectivity.

LicenseSpring provides a solution through a Floating License Server. This server can be set up and customized at your customers' locations, ensuring functionality even when the client application runs on a machine without internet access.

LicenseSpring's offerings encompass both a floating server tailored for private networks and a cloud-based floating license solution. The client SDK functions quite similarly in both situations.

To learn more about the processes of registering, deregistering, managing timeouts, and borrowing licenses using a cloud-based floating license, we encourage you to refer to our Floating Cloud Tutorial.

Floating Client Identifier

The floating client or instance identifier can be accessed through a License object by using:

C++
C#
Swift
|
if let id = license.floatingClientID { ... }


This floating client identifier is set during registration, within the register method shown below.

Floating Client

The FloatingClient class is used to perform requests to LicenseSpring's floating server. Within a FloatingClient object, developers are able to:

  • Register and unregister clients.
  • Borrow licenses.*
  • Retrieve server information.
  • Check whether the connection to the floating server is online.

*Only offered in C++ SDK

Registering a Client

Developers register clients with the following method:

C++
Swift
|
let floatingClient = FloatingClient(configuration: configuration)
let license = try floatingClient.register(userID: "user id")


Note: id is the user or instance id used for license registration, it can be anything: email, hostname, handle, etc.

licenseID is an optional parameter where a specific license identifier can be specified. If no parameter is provided, the license gets the default configuration for the product.

If registration is successful, a shared pointer to the License object is returned. If unsuccessful, an exception is thrown.

Unregistering a Client

The unregister method uses the exact same parameters as register:

C++
C#
Swift
|
try floatingClient.unregister(userID: "user id")


This Boolean result is set to true if the client was unregistered successfully.

License Borrowing

Only available in the C++ SDK, the following method allows developers to register and borrow licenses at once:

C++
Swift
|
try license.borrow(for: 24 * 60 * 60) // 1 day.


Note: The id parameter is the user or instance identifier used for license registration. borrowEndDateTime is the borrow end date time in format "%Y-%m-%dT%H:%M:%SZ", for example "2022-05-28T15:30:00Z".

borrowLicense() can throw the same exceptions as on registration and License::borrow, see those methods for more details.

For more information about license borrowing, see our Floating Licensing Tutorial.

Floating Server and License Information

A helper method for checking the connection the floating server is provided within the FloatingClient object:

C++
C#
Swift
|
let online: Bool = floatingClient.checkConnection()


Note: isOnline() methods have an optional parameter, throwExceptions, that indicates whether the method should throw exceptions.

Using the FloatingClient object, developers are also able to access a FloatingServerInfo object with:

C++
C#
|
FloatingServerInfo floatingServerInfo = floatingClient.GetServerInfo();


FloatingServerInfo consists of:

  • RegistrationExpiry - The floating server registration expiry in minutes.
  • Servers - The list of floating server IP addresses available in the network.

In the .NET SDK, it is also possible to get the license information for a configured product with:

C#
|
License license = floatingClient.GetLicenseInfo();


Note: There is an optional parameter for GetLicenseInfo(), where a specific license identifier can be specified. If no parameter is provided, the license gets the default configuration for the product.

See our Get License Endpoint documentation for more information.

Updated 15 Sep 2023
Did this page help you?
PREVIOUS
Advanced Usage
NEXT
Custom License Storage
Docs powered by
Archbee
TABLE OF CONTENTS
Floating Client Identifier
Floating Client
Registering a Client
Unregistering a Client
License Borrowing
Floating Server and License Information
Docs powered by
Archbee