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
<PackageReference Include="GSMClients.Desktop.Framework" Version="1.0.1" />
<PackageVersion Include="GSMClients.Desktop.Framework" Version="1.0.1" />
<PackageReference Include="GSMClients.Desktop.Framework" />
paket add GSMClients.Desktop.Framework --version 1.0.1
#r "nuget: GSMClients.Desktop.Framework, 1.0.1"
#:package GSMClients.Desktop.Framework@1.0.1
#addin nuget:?package=GSMClients.Desktop.Framework&version=1.0.1
#tool nuget:?package=GSMClients.Desktop.Framework&version=1.0.1
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Microsoft.AspNetCore.SignalR.Client (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.