ThornNetworking 1.0.0

dotnet add package ThornNetworking --version 1.0.0
                    
NuGet\Install-Package ThornNetworking -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="ThornNetworking" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ThornNetworking" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ThornNetworking" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ThornNetworking --version 1.0.0
                    
#r "nuget: ThornNetworking, 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.
#:package ThornNetworking@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ThornNetworking&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ThornNetworking&version=1.0.0
                    
Install as a Cake Tool
flowchart
    classDef hidden display: none;
    classDef MutexLock stroke:#ff0000, stroke-dasharray: 5 5;
    classDef RecieveLock stroke:#00ff00, stroke-dasharray: 5 5;
    classDef SendLock stroke:#0000ff, stroke-dasharray: 5 5;
    classDef DRE stroke:#ff9d00, stroke-dasharray: 5 5;
    classDef TODO stroke:#6bf0ff, stroke-dasharray: 5 5;
    %% unused #d4ff00
    subgraph Legend
        direction TB
        ml[MutexLock]:::MutexLock ~~~ rl[RecieveLock]:::RecieveLock ~~~ sl[SendLock]:::SendLock ~~~ dre[Data Recieve Event]:::DRE ~~~ todo[TODO]:::TODO
    end
    subgraph Host
        direction LR
        HostEntryPoint ~~~ HostingSendingThread
        HostingAcceptConnectionsThread ~~~ HostingReceivingThread
        subgraph HostEntryPoint [Entry Point]
            direction TB
            HostStart([Host Start]) --> OpenSocket[Open Socket on port] --> HostStartThreads
            subgraph HostStartThreads [Start Threads]
                direction TB
                act([AcceptConnections Thread]) ~~~ rt([Receiving Thread]) ~~~ st([Sending Thread])
            end
        end
        subgraph HostingSendingThread [Sending Thread]
            direction TB
            HostSendIsCancelled{IsCancelled} -- Yes --> HostSendQuit([Quit])
            HostSendIsCancelled -- No --> SendBufferEmpty{SendBuffer Empty}
            SendBufferEmpty -- Yes --> HostSendSleep>Sleep deltaTime] --- HostSendHidden:::hidden
            SendBufferEmpty -- No --> CopyBuffer[Dequeue SendBuffer]:::MutexLock --> RecipientLoop[For each recipient]
            RecipientLoop --> SendData[/Send Data/]:::SendLock --- HostSendHidden --> HostSendIsCancelled
        end
        subgraph HostingAcceptConnectionsThread [AcceptConnections Thread]
            direction TB
            WaitConnection>Wait for incoming connection] --> HostAuthenticate[/Authentication/]:::RecieveLock -- Success --> AddConnection[Add to RemoteConnections]:::MutexLock --> WaitConnection
            HostAuthenticate -- Fail --> WaitConnection
        end
        subgraph HostingReceivingThread [Receiving Thread]
            direction TB
            IsConnectedOrCancelled{Disconnected or Cancelled} -- Yes --> HostQuit
            IsConnectedOrCancelled -- No ---> CheckConnectionsUpdate{RemoteConnections Updated}
            CheckConnectionsUpdate -- Yes --> CopyConnections[Copy RemoteConnections]:::MutexLock --> HostReceivingNew[For each new connection] --> HostReceivingStartWait([Start Async Waiting]) --- HostReceivingHidden:::hidden
            CheckConnectionsUpdate -- No --> HostReceivingCheckTimeout([Dispose of connection if past timeout]) --> HostReceivingSleep>Sleep DeltaTime] --- HostReceivingHidden --> IsConnectedOrCancelled
            subgraph HostQuit [Quit]
                direction TB
                HostDisposeThreads[Displose of threads] --> HostDisposeSockets[Dispose of RemoteConnections]
            end
        end
    end
    subgraph Client
        direction TB
        ClientSendingThread & ClientEntryPoint ~~~ ClientReceivingThread
        subgraph ClientEntryPoint [Entry Point]
            direction TB
            ClientStart[(Client Start)] --> AttemptConnection[Attempt Connection] --> ClientAuthenticate[/Authentication/]:::SendLock --> ClientStartThreads
            subgraph ClientStartThreads [Start Threads]
                direction TB
                crt[Recieving Thread] ~~~ cst[Sending Thread]
            end
        end
        subgraph ClientSendingThread [Sending Thread]
            direction TB
            ClientConnected{Connected} -- No ---> ClientQuit([Quit])
            ClientConnected -- Yes --> ClientSendBufferEmpty{SendBuffer Empty} -- No --> ClientCopyBuffer[Copy and Clear SendBuffer]:::MutexLock --> ClientSendData[/Send Data to host/]:::SendLock  --> ClientSendBufferEmpty
            ClientSendBufferEmpty -- Yes ---> ClientPing[/Send Ping for timeout/]:::SendLock --> ClientSendSleep>Sleep deltaTime] --> ClientConnected
            subgraph ClientQuit [Quit]
                direction TB
                ClientDisposeThreads[Dispose Threads] --> ClientDisposeSocket[Dispose Socket]
            end
            style ClientAuthSuccess display:none;
        end
        subgraph ClientReceivingThread [Receiving Thread]
            direction TB
            ClientRecieveWait>Wait for data]:::RecieveLock
            ClientRecieveWait --> ClientIsSync{IsSyncBuffer} -- No --> ClientHandleData[/Raise data recieve event/]:::DRE
            ClientIsSync -- Yes --> ClientUpdateSync[Update SyncBuffer]:::MutexLock
            ClientHandleData & ClientUpdateSync --- h4:::hidden --> ClientRecieveWait
        end
    end
classDiagram
class NetworkManager{
    +Instance NetworkManager
    +IsConnected bool$
    -SendBuffer List~byte[]~$
    +StartHost()
}
namespace ThreadParameters {
    class BaseParameters {
        +token CancellationToken
        +BaseParameters(CancellationToken) BaseParameters
        +BaseParameters(BaseParameters) BaseParameters
    }
    class SentryParameters {
        +cancellationTokenSource CancellationTokenSource
        +SentryParameters() SentryParameters
        +SentryParameters(CancellationTokenSource) SentryParameters
        +SentryParameters(SentryParameters) SentryParameters
    }
}
BaseParameters <|-- SentryParameters
Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

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 219 3/28/2024