AKAISSocketServerExtension 1.0.0.1
dotnet add package AKAISSocketServerExtension --version 1.0.0.1
NuGet\Install-Package AKAISSocketServerExtension -Version 1.0.0.1
<PackageReference Include="AKAISSocketServerExtension" Version="1.0.0.1" />
paket add AKAISSocketServerExtension --version 1.0.0.1
#r "nuget: AKAISSocketServerExtension, 1.0.0.1"
// Install AKAISSocketServerExtension as a Cake Addin
#addin nuget:?package=AKAISSocketServerExtension&version=1.0.0.1
// Install AKAISSocketServerExtension as a Cake Tool
#tool nuget:?package=AKAISSocketServerExtension&version=1.0.0.1
Asp.Net Core WebSocket Manager Extension.
Sample url: https://socket.karayakar.com/indexws.html
With this extension you can specify unlimited hub at run-time, initial client connection starts or join existing hub. Channels isolated by using hub. Ideal for application like multi room, p2p chat or IoT service channel implementations.
Kestrel 2.1.3 Asp.Net Core 2.1.4
wss://socket.karayakar.com/hub/xyz... wss://socket.karayakar.com/hub/abc...
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{
services.AddWebSocketManager();
services.AddTransient<PublicMessageHandler, PublicMessageHandler>();
// ........
}
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, IServiceProvider serviceProvider)
{
app.UseMiddleware<WebSocketManagerMiddleware>(serviceProvider.GetService<PublicMessageHandler>());
var webSocketOptions = new WebSocketOptions()
{
KeepAliveInterval = TimeSpan.FromSeconds(120),
ReceiveBufferSize = 4 * 1024
};
app.UseWebSockets(webSocketOptions);
}
.....
....
public class Program { public static void Main(string[] args) { BuildWebHost().Run(); } public static IWebHost BuildWebHost() {
return new WebHostBuilder()
.UseKestrel(options =>
{
//options.ThreadCount = 10;
//options.UseConnectionLogging("test");
//options.Listen(IPAddress.Loopback, 5000);
//options.Listen(IPAddress.Loopback, 5001, listenOptions =>
//{
// listenOptions.UseHttps("testCert.pfx", "testPassword");
//});
})
.ConfigureAppConfiguration((builderContext, config) =>
{
IHostingEnvironment env = builderContext.HostingEnvironment;
config.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
//.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true);
})
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.UseUrls("http://localhost:5000/")
.Build();
//host.Run();
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.1
- Microsoft.AspNetCore (>= 2.1.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
PublicMessageHandler added