![]() |
VOOZH | about |
dotnet add package Sanet.Transport.SignalR --version 0.4.1
NuGet\Install-Package Sanet.Transport.SignalR -Version 0.4.1
<PackageReference Include="Sanet.Transport.SignalR" Version="0.4.1" />
<PackageVersion Include="Sanet.Transport.SignalR" Version="0.4.1" />Directory.Packages.props
<PackageReference Include="Sanet.Transport.SignalR" />Project file
paket add Sanet.Transport.SignalR --version 0.4.1
#r "nuget: Sanet.Transport.SignalR, 0.4.1"
#:package Sanet.Transport.SignalR@0.4.1
#addin nuget:?package=Sanet.Transport.SignalR&version=0.4.1Install as a Cake Addin
#tool nuget:?package=Sanet.Transport.SignalR&version=0.4.1Install as a Cake Tool
ASP.NET Core SignalR implementation of the Sanet.Transport abstractions for real-time communication over networks.
Sanet.Transport.SignalR provides an implementation of the ITransportPublisher interface using ASP.NET Core SignalR, enabling real-time communication between applications over a network. The library encapsulates all SignalR infrastructure, keeping client applications clean from web server dependencies.
dotnet add package Sanet.Transport.SignalR
Or via the Package Manager Console:
Install-Package Sanet.Transport.SignalR
// Create a SignalR host (server)
var hostManager = await SignalRTransportFactory.CreateHostAsync(port: 5000);
// Get the server-side publisher
ITransportPublisher serverPublisher = hostManager.Publisher;
// Subscribe to messages from clients
serverPublisher.Subscribe(message => {
Console.WriteLine($"Server received: {message.CommandType}");
// Broadcast a response to all clients
serverPublisher.PublishMessage(new TransportMessage {
CommandType = "ServerResponse",
SourceId = Guid.NewGuid(),
Payload = "{\"server\": \"response\"}",
Timestamp = DateTime.UtcNow
});
});
// Discover hosts on the network
var hosts = await discoveryService.DiscoverHostsAsync(timeoutSeconds: 5);
// Connect to the first discovered host
if (hosts.Count > 0)
{
// Create a client publisher connected to the host
ITransportPublisher clientPublisher = SignalRTransportFactory.CreateClient(hosts[0]);
// Subscribe to messages from the server
clientPublisher.Subscribe(message => {
Console.WriteLine($"Client received: {message.CommandType}");
});
// Send a message to the server
clientPublisher.PublishMessage(new TransportMessage {
CommandType = "ClientCommand",
SourceId = Guid.NewGuid(),
Payload = "{\"client\": \"data\"}",
Timestamp = DateTime.UtcNow
});
}
// Connect to a known host
var hostInfo = new HostInfo { Url = "http://192.168.1.100:5000" };
ITransportPublisher clientPublisher = SignalRTransportFactory.CreateClient(hostInfo);
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.4.1 | 328 | 4/7/2025 | 0.4.1 is deprecated because it is no longer maintained. |
| 0.4.0 | 360 | 4/1/2025 | 0.4.0 is deprecated because it is no longer maintained. |
| 0.3.2 | 334 | 3/31/2025 | 0.3.2 is deprecated because it is no longer maintained. |
| 0.3.1 | 303 | 3/30/2025 | 0.3.1 is deprecated because it is no longer maintained. |
| 0.3.0 | 318 | 3/29/2025 | 0.3.0 is deprecated because it is no longer maintained. |
| 0.2.0 | 267 | 3/29/2025 | 0.2.0 is deprecated because it is no longer maintained. |
| 0.2.0-preview | 293 | 3/28/2025 | 0.2.0-preview is deprecated because it is no longer maintained. |
| 0.1.0-preview | 294 | 3/28/2025 | 0.1.0-preview is deprecated because it is no longer maintained. |