dmuka3.CS.Simple.Queuing
1.0.3
dotnet add package dmuka3.CS.Simple.Queuing --version 1.0.3
NuGet\Install-Package dmuka3.CS.Simple.Queuing -Version 1.0.3
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="dmuka3.CS.Simple.Queuing" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add dmuka3.CS.Simple.Queuing --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: dmuka3.CS.Simple.Queuing, 1.0.3"
#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 dmuka3.CS.Simple.Queuing as a Cake Addin #addin nuget:?package=dmuka3.CS.Simple.Queuing&version=1.0.3 // Install dmuka3.CS.Simple.Queuing as a Cake Tool #tool nuget:?package=dmuka3.CS.Simple.Queuing&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
dmuka3.CS.Simple.Queuing
This library provides you to consume queue by order. It is working on disk. This library is like RabbitMQ. You can also see the queue on file explorer.
Nuget
Link : https://www.nuget.org/packages/dmuka3.CS.Simple.Queuing
Install-Package dmuka3.CS.Simple.Queuing
Example 1
We should create a server to connect and to enqueue. After that, we will connect to this server to dequeue.
// Creating the server.
QueuingServer server = new QueuingServer("muhammed", "123123", 2048, 4, 9090, timeOutAuth: 1);
// Starting it as async.
new Thread(() =>
{
server.Start();
}).Start();
// Wait the server.
Thread.Sleep(1000);
// Client to enqueue.
QueuingClient client1 = new QueuingClient("127.0.0.1", 9090);
// Connect to the server.
client1.Start("muhammed", "123123", 2048);
// Client to dequeue.
QueuingClient client2 = new QueuingClient("127.0.0.1", 9090);
// Connect to the server.
client2.Start("muhammed", "123123", 2048);
// Queue's data.
string sendedBody = Guid.NewGuid().ToString();
// This is only for checking.
string gotBody = "";
new Thread(() =>
{
// Dequeue a data from server.
var queue = client2.Dequeue();
// What was the body?
gotBody = queue.body;
// Dequeue completed.
client2.DequeueCompleted(queue.queueName);
}).Start();
new Thread(() =>
{
// Enqueue a data.
client1.Enqueue(sendedBody);
}).Start();
Thread.Sleep(1000);
client1.Dispose();
client2.Dispose();
server.Dispose();
Assert.AreEqual(sendedBody, gotBody);
You may wonder what is the "2048". It is key size of RSA. We always use RSA during communication on TCP. This is security to save your secret datas.
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 | netcoreapp3.0 is compatible. netcoreapp3.1 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.0
- dmuka3.CS.Simple.Semaphore (>= 1.0.1)
- dmuka3.CS.Simple.TCP (>= 1.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.