System.Net.ServerSentEvents 10.0.12
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.
Showing the top 20 packages that depend on System.Net.ServerSentEvents.
| Packages | Downloads |
|---|---|
|
ModelContextProtocol.Core
Core .NET SDK for the Model Context Protocol (MCP)
|
3 |
|
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/95017c711e6afc1085133d440e42b4bd78155701
|
3 |
|
Microsoft.Agents.AI.OpenAI
Provides Microsoft Agent Framework support for OpenAI.
|
2 |
|
System.ClientModel
Contains building blocks for clients that call cloud services.
|
2 |
|
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/901ca941248413c79832d2fdbd709da0c4386353
|
1 |
|
Microsoft.Agents.AI.OpenAI
Provides Microsoft Agent Framework support for OpenAI.
|
1 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.12)
- System.Memory (>= 4.6.3)
- System.Threading.Tasks.Extensions (>= 4.6.3)
.NET 8.0
- No dependencies.
.NET 9.0
- No dependencies.
.NET 10.0
- No dependencies.
.NET Standard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.12)
- System.Memory (>= 4.6.3)
- System.Threading.Tasks.Extensions (>= 4.6.3)
| Version | Downloads | Last updated |
|---|---|---|
| 11.0.0-rc.1.26425.128 | 1 | 2026/9/13 |
| 11.0.0-preview.7.26381.103 | 0 | 2026/8/11 |
| 11.0.0-preview.6.26359.118 | 0 | 2026/7/14 |
| 11.0.0-preview.5.26302.115 | 0 | 2026/6/9 |
| 11.0.0-preview.4.26230.115 | 0 | 2026/5/12 |
| 11.0.0-preview.3.26207.106 | 0 | 2026/4/14 |
| 11.0.0-preview.2.26159.112 | 0 | 2026/3/10 |
| 11.0.0-preview.1.26104.118 | 0 | 2026/2/10 |
| 10.0.12 | 3 | 2026/9/11 |
| 10.0.11 | 3 | 2026/8/20 |
| 10.0.10 | 2 | 2026/8/10 |
| 10.0.9 | 0 | 2026/6/9 |
| 10.0.8 | 0 | 2026/5/12 |
| 10.0.7 | 0 | 2026/4/21 |
| 10.0.6 | 0 | 2026/4/14 |
| 10.0.5 | 0 | 2026/3/12 |
| 10.0.4 | 0 | 2026/3/10 |
| 10.0.3 | 0 | 2026/2/10 |
| 10.0.2 | 0 | 2026/1/13 |
| 10.0.1 | 0 | 2025/12/9 |
| 10.0.0 | 0 | 2025/11/11 |
| 10.0.0-rc.2.25502.107 | 0 | 2025/10/14 |
| 10.0.0-rc.1.25451.107 | 0 | 2025/9/9 |
| 10.0.0-preview.7.25380.108 | 0 | 2025/8/12 |
| 10.0.0-preview.6.25358.103 | 0 | 2025/7/15 |
| 10.0.0-preview.5.25277.114 | 0 | 2025/6/6 |
| 10.0.0-preview.4.25258.110 | 0 | 2025/5/12 |
| 10.0.0-preview.3.25171.5 | 0 | 2025/4/10 |
| 10.0.0-preview.2.25163.2 | 0 | 2025/3/18 |
| 10.0.0-preview.1.25080.5 | 0 | 2025/2/25 |
| 9.0.20 | 1 | 2026/9/14 |
| 9.0.19 | 0 | 2026/8/11 |
| 9.0.18 | 0 | 2026/7/14 |
| 9.0.17 | 0 | 2026/6/9 |
| 9.0.16 | 0 | 2026/5/12 |
| 9.0.15 | 0 | 2026/4/14 |
| 9.0.14 | 0 | 2026/3/10 |
| 9.0.13 | 0 | 2026/2/10 |
| 9.0.12 | 0 | 2026/1/13 |
| 9.0.11 | 0 | 2025/11/11 |
| 9.0.10 | 0 | 2025/10/14 |
| 9.0.9 | 1 | 2026/9/14 |
| 9.0.8 | 1 | 2026/9/14 |
| 9.0.7 | 1 | 2026/9/14 |
| 9.0.6 | 1 | 2026/9/14 |
| 9.0.5 | 1 | 2026/9/14 |
| 9.0.4 | 1 | 2026/9/14 |
| 9.0.3 | 1 | 2026/9/14 |
| 9.0.2 | 1 | 2026/9/14 |
| 9.0.1 | 1 | 2026/9/14 |
| 9.0.0 | 1 | 2026/9/14 |
| 9.0.0-rc.2.24473.5 | 0 | 2024/10/8 |
| 9.0.0-rc.1.24431.7 | 0 | 2024/9/10 |
| 9.0.0-preview.7.24405.7 | 0 | 2024/8/13 |
| 9.0.0-preview.6.24327.7 | 0 | 2024/7/9 |