TomLabs.PixelBridge.Host
0.3.2
dotnet add package TomLabs.PixelBridge.Host --version 0.3.2
NuGet\Install-Package TomLabs.PixelBridge.Host -Version 0.3.2
<PackageReference Include="TomLabs.PixelBridge.Host" Version="0.3.2" />
<PackageVersion Include="TomLabs.PixelBridge.Host" Version="0.3.2" />
<PackageReference Include="TomLabs.PixelBridge.Host" />
paket add TomLabs.PixelBridge.Host --version 0.3.2
#r "nuget: TomLabs.PixelBridge.Host, 0.3.2"
#:package TomLabs.PixelBridge.Host@0.3.2
#addin nuget:?package=TomLabs.PixelBridge.Host&version=0.3.2
#tool nuget:?package=TomLabs.PixelBridge.Host&version=0.3.2
TomLabs.PixelBridge.Host
The capturing side of PixelBridge, the channel that carries data out of World of Warcraft: it finds the game
window, captures the strip the in-game PixelBridge addon draws, decodes and deduplicates it, and republishes every
message on the local pipe \\.\pipe\tomlabs-pixelbridge for other programs
(TomLabs.PixelBridge has the client).
Windows only at run time (user32/gdi32). The package targets plain net10.0, so check OperatingSystem.IsWindows()
before starting it in a cross-platform app.
Run the bridge in your app
Several apps may want the bridge; only one captures. BridgeRuntime makes the first app the host and every later one
a client of its pipe, and a client takes over within about 2 s when the host exits. Your consumers see the same
snapshots and messages in both roles.
using TomLabs.PixelBridge;
using TomLabs.PixelBridge.Host;
var runtime = new BridgeRuntime(
new BridgeRuntimeOptions { Name = "MyTool", Version = "1.0.0", Channels = [Channels.FoxieEvents, Channels.FoxieState] },
() => new BridgeHost(new GameWindowLocator(), new GdiStripCapture(), () => new BridgeHostOptions(), loggerFactory.CreateLogger<BridgeHost>()),
[new MyConsumer()],
loggerFactory);
await runtime.RunAsync(cancellationToken);
sealed class MyConsumer : IBridgeConsumer
{
public Task OnTickAsync(IReadOnlyList<BridgeMessage> fresh, BridgeSnapshot bridge, CancellationToken ct)
{
// bridge.Role (Host/Client), bridge.HostName, bridge.GameFound, bridge.Session, bridge.Status (channel 0) ...
foreach (var message in fresh) Console.WriteLine($"#{message.Channel} {message.Kind} seq {message.Seq}");
return Task.CompletedTask;
}
public Task StopAsync() => Task.CompletedTask;
}
GameWindowLocatorfinds retail, Classic, PTR, beta (WowB.exe) and WoW Forever clients by process name or by theGxWindowClasswindow class; pass extra process names for other builds.BridgeHostOptions.CaptureMethod:Screen(BitBlt of the visible screen; works with every renderer) orWindow(PrintWindow; works while the game is covered, not with every renderer). Read before every capture.- Logging goes through
Microsoft.Extensions.Logging; pass nothing for no logs. - Lower level:
BridgeHost.Tick(),BridgeLoop.RunAsyncandPipeServerrun a host without the election.
The protocol and the pipe lines are described in docs/protocol.md in the TomLabs.PixelBridge package.
Licence
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- TomLabs.PixelBridge (>= 0.3.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Release notes: https://www.curseforge.com/wow/addons/pixelbridge/files