GSMClients.Desktop.Framework 1.0.1

dotnet add package GSMClients.Desktop.Framework --version 1.0.1
                    
NuGet\Install-Package GSMClients.Desktop.Framework -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GSMClients.Desktop.Framework" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GSMClients.Desktop.Framework" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="GSMClients.Desktop.Framework" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GSMClients.Desktop.Framework --version 1.0.1
                    
#r "nuget: GSMClients.Desktop.Framework, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GSMClients.Desktop.Framework@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GSMClients.Desktop.Framework&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=GSMClients.Desktop.Framework&version=1.0.1
                    
Install as a Cake Tool

GSMClients.Desktop.Framework ✨

Global Session Manager ( GSM ) Client library for .NET Framework Desktop Applications. Provides easy integration with GSM Server for:

Features 🎉

  • Session Managment 🔐 : SSO :-
    • Single Active Session (SSA) Ensures only one active session per user across apps.
    • Single Active User Per Device (SAUPD) Restricts multiple logins from same device.
  • Push Notifications 🔔 : Real-Time alerts instantly to connected clients
  • Scheduled Triggers ⏰ : Automates periodic tasks like session cleanup and Notifications.

Installation 🛠️

Install via NuGet:

dotnet add package GSMClients.Desktop.Framework

Steps 💡

There are two simple steps to follow:

1. GSM Configuration :-

In your Login Controller, add the following lines to retrieve the GSM Token:

Dim gsmData = Await GSMClient.InitializeAsync(
    loggedUserId:=UsernameTextBox.Text,
    baseUrl:=baseUrl,
    clientId:=clientId,
    clientSecret:=clientSecret,
    sessionId:=Guid.NewGuid().ToString(),
    sessionIp:=ipv4,
    ignoreCertErrors:=True
  )

// ✅ You will receive the connection details in the gsmData variable. just ensure the gsmData has gsmData.Token.

2. GSM Initializtion :-

Add JS Libraries in View Layout Pages.


/**
 * ✨ After receiving the gsmData.Token , trigger this method, then you will be connected to the GSM.
 */

 _hub = New GSMHub() With {
        .ApiUrl = Data.BaseUrl,
        .Token = Data.Token,
        .UserId = Data.UserId,
        .SessionId = Data.SessionId,
        .SessionIp = Data.SessionIp
    }

_hub.OnForceLogout = Sub()
        MainForm.LogoutToolStripMenuItem_Click(Nothing, EventArgs.Empty)
        Environment.Exit(0)
    End Sub

Await _hub.ConnectAsync(ignoreCertErrors:=True)


Dim IsGSMRegistered As Boolean = Await _hub.RegistrationTaskSource.Task

If IsGSMRegistered Then
    'AuthenticateUser(True)
    Return
End If

}


Using GSM Services 🚀:-

After configuring GSM, now you can trigger broadcasts for real-time messages or data, such as push notifications.

Service 1: Send message to specific user :-
Imports GSMClients.Desktop.Framework

Dim resp = Await GSMService.BroadcastToUserAsync(
    baseUrl:=Data.BaseUrl,
    token:=Data.Token,
    userId:=Data.UserId,           ' or any target user id
    message:="Welcome to GSM!",
    userProjectId:="",             ' optional
    ignoreCertErrors:=False        ' True only in DEV/UAT
)

Service 2 : Send Message to all user :-

Dim resp = Await GSMService.BroadcastToGroupAsync(
    baseUrl:=Data.BaseUrl,
    token:=Data.Token,
    message:="Hello Project Team!",
    userProjectId:="PRJ-001",
    ignoreCertErrors:=False
)

Package Contents 📦

  • GSMClient.cs (C# helper class)

  • GSMHub.cs (C# helper class)

  • GSMService.cs (C# service class)


Requirements ✅

  • .NET Framework Desktop Application

We hope this is exactly what you were looking for! Let me know if you have any other requests. Thank you.. 😊

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 189 11/26/2025
1.0.0 185 11/26/2025