Tesses.Broadcast
1.0.0
dotnet add package Tesses.Broadcast --version 1.0.0
NuGet\Install-Package Tesses.Broadcast -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="Tesses.Broadcast" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Tesses.Broadcast --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Tesses.Broadcast, 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 Tesses.Broadcast as a Cake Addin #addin nuget:?package=Tesses.Broadcast&version=1.0.0 // Install Tesses.Broadcast as a Cake Tool #tool nuget:?package=Tesses.Broadcast&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Tesses.Broadcast
A simple udp broadcast library
Client
using Tesses.Broadcast;
await foreach(var item in BroadcastClient.ScanAsync("Test",6942,default)) //replace Test with your service name, replace 6942 with desired port used by server, replace default with CancellationToken
{
Console.WriteLine($"Found device {item.DeviceName} with {item.ServiceUrl} and with ip: {item.Endpoint}");
}
Server
using Tesses.Broadcast;
await new BroadcastServerBuilder()
.WithDeviceName("Mikes Phone") //replace with the server name (any string)
.WithService("Test","http://127.0.0.1:3254/") //127.0.0.1 will be rewriten by client
.WithService("Other Service", "http://127.0.0.1:4949/") //another service my friend
.WithPort(6942) //replace with desired port to listen on
.Build()
.ListenAsync();
Eto
Install this nuget package.
using(var bro = new BroadcastDialog("Test",6942)) //replace Test with your service name, replace 6942 with desired port used by server
{
serviceUrl.Text=bro.ShowModal(); //will return empty string if cancelled
}
Protocol
Request
Type | Name | Value | Description |
---|---|---|---|
char[11] | Signature | "TessesBcReq" | A signature to decern a request from a random udp packet |
uint16be | NameLength | <The Length of Name> | The big endian 16 bit, byte length of Name |
char[NameLength] | Name | <The Service Name> | The Service Name, Test in the example |
Response
Type | Name | Value | Description |
---|---|---|---|
char[12] | Signature | "TessesBcResp" | A signature to decern a response from a random udp packet |
uint16be | DeviceNameLength | <The Length of DeviceName> | The big endian 16 bit, byte length of DeviceName |
char[DeviceNameLength] | DeviceName | <The Device Name> | The Device Name, "Mikes Phone" in this example |
uint16be | ServiceUrlLength | <The Length of ServiceUrl> | The big endian 16 bit, byte length of ServiceUrl |
char[ServiceUrlLength] | ServiceUrl | <The Service Url> | The Service Url, "http://127.0.0.1:3254/" in this example |
Converting the url
If the hostname starts with "127." or equals "localhost" replace the hostname with the remote ip (server ip) (do this on the client)
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.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Tesses.Broadcast:
Package | Downloads |
---|---|
Tesses.Broadcast.Eto
Find devices on your network, using broadcast over UDP |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 179 | 3/26/2024 |