From a5fa3d2b51349bde9a8ed300bdafcfc40bd97213 Mon Sep 17 00:00:00 2001 From: Murat Sanlisavas Date: Wed, 19 Mar 2025 18:49:30 +0300 Subject: [PATCH] Add SSE section for Casper .NET SDK 3.x Introduced a new section on Working with Server-Sent Events (SSE) in the documentation for the Casper .NET SDK 3.x. This includes details about the new optional odeVersion parameter in the ServerEventsClient class and provides example code for creating a ServerEventsClient for Node version 2.x, demonstrating the default behavior when odeVersion is not specified. Signed-off-by: Murat Sanlisavas --- Docs/Articles/WorkingWithSSE.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Docs/Articles/WorkingWithSSE.md diff --git a/Docs/Articles/WorkingWithSSE.md b/Docs/Articles/WorkingWithSSE.md new file mode 100644 index 0000000..f82e8d1 --- /dev/null +++ b/Docs/Articles/WorkingWithSSE.md @@ -0,0 +1,13 @@ +# Working with Server-Sent Events (SSE) in Casper .NET SDK 3.x + +The new Casper Node **2.x** version introduced changes to the SSE protocol. To support these changes, the Casper .NET SDK has been updated to version **3.x**, introducing a new optional parameter `nodeVersion` in the `ServerEventsClient`. + +## Creating `ServerEventsClient` for Node v2.x (Default) + +When working with the new Casper Node version **2.x**, instantiate the `ServerEventsClient` without specifying the `nodeVersion`. The default value is set to `2`: + +```csharp +var sse = new ServerEventsClient(eventIpAddress, localNetPort, nodeVersion: 1); // For versions 1.x + +var sse = new ServerEventsClient(eventIpAddress, localNetPort); // The default value is 2 +``` \ No newline at end of file