System.Net.ServerSentEvents
10.0.6
Prefix Reserved
See the version list below for details.
dotnet add package System.Net.ServerSentEvents --version 10.0.6
NuGet\Install-Package System.Net.ServerSentEvents -Version 10.0.6
<PackageReference Include="System.Net.ServerSentEvents" Version="10.0.6" />
<PackageVersion Include="System.Net.ServerSentEvents" Version="10.0.6" />
<PackageReference Include="System.Net.ServerSentEvents" />
paket add System.Net.ServerSentEvents --version 10.0.6
#r "nuget: System.Net.ServerSentEvents, 10.0.6"
#:package System.Net.ServerSentEvents@10.0.6
#addin nuget:?package=System.Net.ServerSentEvents&version=10.0.6
#tool nuget:?package=System.Net.ServerSentEvents&version=10.0.6
About
System.Net.ServerSentEvents provides the SseParser type, which exposes factory methods for creating parsers for the events in a stream of server-sent events (SSE).
Key Features
- Parser for server-sent events (SSE)
How to Use
Asynchronously parsing event contents as strings
using HttpClient client = new();
using Stream stream = await client.GetStreamAsync("https://localhost:12345/sse");
await foreach (SseItem<string> item in SseParser.Create(stream).EnumerateAsync())
{
Console.WriteLine(item.Data);
}
Synchronously parsing event contents as JSON
MemoryStream stream = new(data);
foreach (SseItem<Book> item in SseParser.Create(stream, (eventType, bytes) => JsonSerializer.Deserialize<Book>(bytes)).Enumerate())
{
Console.WriteLine(item.Data.Author);
}
Main Types
The main types provided by this library are:
System.Net.ServerSentEvents.SseParserSystem.Net.ServerSentEvents.SseParser<T>System.Net.ServerSentEvents.SseItem<T>
Feedback & Contributing
System.Net.ServerSentEvents is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
| 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 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. net9.0 is compatible. 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 is compatible. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| 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. |
-
.NETFramework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.6)
- System.Memory (>= 4.6.3)
- System.Threading.Tasks.Extensions (>= 4.6.3)
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.6)
- System.Memory (>= 4.6.3)
- System.Threading.Tasks.Extensions (>= 4.6.3)
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (53)
Showing the top 5 NuGet packages that depend on System.Net.ServerSentEvents:
| Package | Downloads |
|---|---|
|
Microsoft.AspNetCore.Http.Connections.Client
Client for ASP.NET Core Connection Handlers This package was built from the source code at https://github.com/dotnet/dotnet/tree/a8b33e7593686eaee701cd124daaabff2311634f |
|
|
OpenAI
The official .NET library for the OpenAI service API. |
|
|
ModelContextProtocol.Core
Core .NET SDK for the Model Context Protocol (MCP) |
|
|
Facility.Core
A library for consuming/implementing Facility APIs. |
|
|
Azure.AI.Agents.Persistent
This is the Azure.AI.Agents.Persistent client library for developing .NET applications with rich experience. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.3.26207.106 | 134 | 4/14/2026 |
| 11.0.0-preview.2.26159.112 | 707 | 3/10/2026 |
| 11.0.0-preview.1.26104.118 | 819 | 2/10/2026 |
| 10.0.6 | 5,985 | 4/14/2026 |
| 10.0.5 | 140,413 | 3/12/2026 |
| 10.0.4 | 40,014 | 3/10/2026 |
| 10.0.3 | 432,278 | 2/10/2026 |
| 10.0.2 | 438,400 | 1/13/2026 |
| 10.0.1 | 418,227 | 12/9/2025 |
| 10.0.0 | 674,148 | 11/11/2025 |
| 10.0.0-rc.2.25502.107 | 710,894 | 10/14/2025 |
| 10.0.0-rc.1.25451.107 | 66,180 | 9/9/2025 |
| 10.0.0-preview.7.25380.108 | 6,052 | 8/12/2025 |
| 9.0.15 | 8,293 | 4/14/2026 |
| 9.0.14 | 64,637 | 3/10/2026 |
| 9.0.13 | 72,151 | 2/10/2026 |
| 9.0.12 | 66,994 | 1/13/2026 |
| 9.0.11 | 377,273 | 11/11/2025 |
| 9.0.10 | 1,197,883 | 10/14/2025 |
| 9.0.9 | 3,516,658 | 9/9/2025 |