XSSocket 1.0.0

dotnet add package XSSocket --version 1.0.0
NuGet\Install-Package XSSocket -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="XSSocket" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XSSocket --version 1.0.0
#r "nuget: XSSocket, 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 XSSocket as a Cake Addin
#addin nuget:?package=XSSocket&version=1.0.0

// Install XSSocket as a Cake Tool
#tool nuget:?package=XSSocket&version=1.0.0

<p align="center"> <img src="XSSocket/XSSocket.png" width="800" height="600" style="display: block; margin: 0 auto"/>

</p>

Features

XSSocket is an XSOverlay API connector for .Net. It allows you to connect to the XSOverlay API and send and receive data.

  • Send and receive data to the XSOverlay API
  • Events for connection status and data received
  • Enhanced object classes for ease-of-use
  • Support for .Net 5.0 and .Net Standard 2.0
  • Fully supports

Usage

public static async Task Main(string[] args)
{
    XSSocket connector = new XSSocket("Demo"); // create a new connector with the source app name "Demo"
    connector.ConnectAsync().ConfigureAwait(false);
    while (connector.State == WebSocketState.Connecting)
    {
        Console.WriteLine("Connecting...");
        await Task.Delay(1000); // wait 1 second
    }
    
    if (connector.State == WebSocketState.Open)
    {
        Console.WriteLine("Connected!");
    }
    else
    {
        Console.WriteLine($"Connection failed with state: {connector.State}");
    }

    Console.WriteLine("Sending Notification...");
    
    
    XSNotificationObject notificationObject =
        new XSNotificationObject()
        {
            title = "Hello World",
            content = "This is a test notificationObject",
            sourceApp = "Demo"
        };
    await connector.SendNotification(notificationObject);
    await Task.Delay(1000); // wait 1 second
    
    
    Console.WriteLine("Disconnecting...");

    connector.Disconnect();
}

Demo

The demo project is a simple console application that connects to the XSOverlay API and demonstrates how to utilize various features of the connectors and the API.

Discord

For questions on XSOverlay or the API, you may join the Discord server for discussion or read the documentation.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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. 
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
1.0.0 88 1/30/2024