DanmakuR 1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package DanmakuR --version 1.0.0
NuGet\Install-Package DanmakuR -Version 1.0.0
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="DanmakuR" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DanmakuR --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DanmakuR, 1.0.0"
#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.
// Install DanmakuR as a Cake Addin #addin nuget:?package=DanmakuR&version=1.0.0 // Install DanmakuR as a Cake Tool #tool nuget:?package=DanmakuR&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DanmakuR
通过HubConnection
连接到b站直播间弹幕信息流,传输方式可以是Websocket
或TCP
之一。
快速上手
// 1. 创建`HubConnenction`
using DanmakuR;
var connBuilder = new BLiveHubConnectionBuilder();
connBuilder.UseWebsocketTransport()
.WithRoomid(2233);// 基本用法
HubConnection connection = connBuilder.Build();
// 2. 响应事件
// Listener.cs
class Listener : IDanmakuSource
{
public async Task OnMessageJsonDocumentAsync(string messageName, JsonDocument message)
{
switch (messageName)
{
// ...
}
}
public async Task OnPopularityAsync(int popularity)
{
// 气人值
}
}
// 3. 绑定监听器并启动连接
listener.BindToConnection(connection);
await connection.StartAsync();
TCP连接?
目前,建立TCP连接需要ASP.NET Core的Kestrel(Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionFactory类),也就是说只能在ASP.NET Core服务器上用。
那维护呢
随缘
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- DanmakuR.Connection (>= 1.0.0)
- DanmakuR.Protocol (>= 1.0.0)
- Microsoft.AspNetCore.SignalR.Client (>= 6.0.7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DanmakuR:
Package | Downloads |
---|---|
DanmakuR.Connection.Kestrel
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.