Skip to content

Commit 36bb573

Browse files
Merge pull request #98 from msanlisavas/master
Add SSE section for Casper .NET SDK 3.x Introduced a new section on W…
2 parents 90d64a2 + a5fa3d2 commit 36bb573

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Docs/Articles/WorkingWithSSE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Working with Server-Sent Events (SSE) in Casper .NET SDK 3.x
2+
3+
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`.
4+
5+
## Creating `ServerEventsClient` for Node v2.x (Default)
6+
7+
When working with the new Casper Node version **2.x**, instantiate the `ServerEventsClient` without specifying the `nodeVersion`. The default value is set to `2`:
8+
9+
```csharp
10+
var sse = new ServerEventsClient(eventIpAddress, localNetPort, nodeVersion: 1); // For versions 1.x
11+
12+
var sse = new ServerEventsClient(eventIpAddress, localNetPort); // The default value is 2
13+
```

0 commit comments

Comments
 (0)