SMTSP 1.0.13

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package SMTSP --version 1.0.13
NuGet\Install-Package SMTSP -Version 1.0.13
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="SMTSP" Version="1.0.13" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SMTSP --version 1.0.13
#r "nuget: SMTSP, 1.0.13"
#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 SMTSP as a Cake Addin
#addin nuget:?package=SMTSP&version=1.0.13

// Install SMTSP as a Cake Tool
#tool nuget:?package=SMTSP&version=1.0.13

SMTSP - Send Me That Shit Protocol

Very work in progress. Shouldn't be used in production just jet.

Build

Available on NuGet.

The SMTS-Protocol is what powers InterShare. It allows us to send data between devices in a very high level way. So we don't have to care how data is transferred. This protocol includes a discovery-service, which is used to discover nearby devices, and the actual transfer-service to send the data to the desired peripheral.

Examples

Discovering devices:

var myDevice = new DeviceInfo(
  deviceId: "EE27A6ED-6F30-4299-A35F-AC3B7139F733",
  deviceName: "My Device",
  port: 42013,
  deviceType: DeviceTypes.Phone,
  ipAddress: "192.168.1.42",
  capabilities: new[] { "InterShare" }
);

var discovery = new DeviceDiscovery(myDevice);
disocvery.StartDiscovering();
discovery.DiscoveredDevices.CollectionChanged += (sender, args) =>
{
    // Some device was discovered.
};

Advertise a device:

var discovery = new DeviceDiscovery(myDevice);
discovery.Advertise();

Sending a file:

FileStream file = File.OpenRead("file.txt");

var content = new SmtspFileContent
{
    FileName = "SomeFile.txt",
    DataStream = file
};

await SmtspSender.Send(_receiver, content, _sender);

Receiving a file:

var receiver = new SmtspReceiver();
receiver.StartReceiving();
receiver.RegisterTransferRequestCallback((TransferRequest request) => Task.FromResult(true));
receiver.OnContentReceive += (sender, content) =>
{
    FileStream stream = File.OpenWrite("File.txt");
    content.DataStream?.CopyTo(stream);
};

Discovery

To increase the chance of discovering devices, SMTSP uses multiple technologies to advertise and discover peripherals. <br /> The first method uses UDP Broadcasts to send out lookup signals and listen for responses. The second method uses MDNS-Service Discovery.

Transfer

To transfer the data, the current implementation only uses a TCP Socket. Future plans also include a Bluetooth discovery and transfer.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  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. 
.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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.2-beta 202 7/31/2022
2.1.1-beta 143 7/30/2022
2.1.0-beta 265 5/22/2022
2.0.0-beta 199 5/7/2022
1.0.13 564 3/30/2022
1.0.12 494 3/19/2022
1.0.11 516 3/19/2022
1.0.10 681 3/12/2022
1.0.9 478 3/12/2022
1.0.8 387 3/12/2022
1.0.7 394 3/12/2022
1.0.6 405 3/8/2022
1.0.5 401 2/20/2022
1.0.4 402 2/20/2022
1.0.3 398 2/19/2022