XmobiTea.ProtonNet.Server 1.0.0

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

// Install XmobiTea.ProtonNet.Server as a Cake Tool
#tool nuget:?package=XmobiTea.ProtonNet.Server&version=1.0.0                

XmobiTea.ProtonNet.Server

Installation

To install the XmobiTea.ProtonNet.Server package, you can use the following command:

dotnet add package XmobiTea.ProtonNet.Server

Features

  • User Peer Management: Manage user peers, including mapping, removing, and retrieving user peers based on session IDs or user IDs.
  • Session Management: Handle session-related operations such as mapping, removing, and retrieving sessions.
  • Event Handling: Manage and handle events with support for custom event handlers.
  • Request Handling: Process and handle operation requests with support for custom request handlers.
  • RPC Protocol: Support for RPC protocol operations, including serialization, deserialization, and encryption.
  • Authentication Token Management: Generate and verify authentication tokens for user peers.

Usage

Here is an example of how to use the XmobiTea.ProtonNet.Server package:

using XmobiTea.ProtonNet.Server.Services;
using XmobiTea.ProtonNet.Server.Models;

// Initialize services
var userPeerService = new UserPeerService();
var sessionService = new SessionService();
var eventService = new EventService();
var requestService = new RequestService();
var rpcProtocolService = new RpcProtocolService();
var userPeerAuthTokenService = new UserPeerAuthTokenService();

// Map a user peer to a session ID
userPeerService.MapUserPeer("sessionId123", new UserPeer());

// Retrieve a user peer
var userPeer = userPeerService.GetUserPeer("sessionId123");

// Handle an event
eventService.Handle(new OperationEvent(), new SendParameters(), userPeer, new Session());

// Generate an authentication token
var token = userPeerAuthTokenService.GenerateToken(new UserPeerTokenPayload { UserId = "user123" });

// Verify an authentication token
if (userPeerAuthTokenService.TryVerifyToken(token, out var header, out var payload))
{
    Console.WriteLine($"Token verified for user: {payload.UserId}");
}

Supported Data Types

  • IUserPeer: Interface for managing user peers.
  • ISession: Interface for session management.
  • IEventHandler: Interface for handling events.
  • IRequestHandler: Interface for handling requests.
  • IAuthToken: Interface for authentication token management.

Extensibility

You can extend the functionalities by implementing your own versions of the provided interfaces such as IUserPeerService, ISessionService, IEventService, and IRequestService.

Contributing

Contributions are welcome! Please fork this repository and submit a pull request if you'd like to contribute to the project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Thanks to the developers of XmobiTea for providing the foundational libraries that this package builds upon.
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 is compatible.  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 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net46 is compatible.  net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
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 (2)

Showing the top 2 NuGet packages that depend on XmobiTea.ProtonNet.Server:

Package Downloads
XmobiTea.ProtonNet.Server.Socket

XmobiTea.ProtonNet.Server.Socket is designed to create a server and listen for various types of sockets. It provides the necessary infrastructure to manage socket connections, enabling efficient communication and data exchange between clients and the server within the ProtonNet framework.

XmobiTea.ProtonNet.Server.WebApi

XmobiTea.ProtonNet.Server.WebApi is designed to create a server and listen for web API requests. It provides the necessary infrastructure to handle HTTP requests, enabling the development of web services and APIs within the ProtonNet framework.

GitHub repositories

This package is not used by any popular GitHub repositories.