System.Net.ServerSentEvents 9.0.14
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 |
|---|---|
|
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/44525024595742ebe09023abe709df51de65009b
|
7 |
|
OpenAI
The official .NET library for the OpenAI service API.
|
6 |
|
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/89c8f6a112d37d2ea8b77821e56d170a1bccdc5a
|
5 |
|
OpenAI
The official .NET library for the OpenAI service API.
|
5 |
|
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/b0f34d51fccc69fd334253924abd8d6853fad7aa
|
4 |
|
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/aspnetcore/tree/ff66c263be7ed395794bdaf616322977b8ec897c
|
4 |
|
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/fad253f51b461736dfd3cd9c15977bb7493becef
|
3 |
|
OpenAI
The official .NET library for the OpenAI service API.
|
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/aspnetcore/tree/d5dc8a13cc618b9cbdc1e5744b4806c594d49553
|
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/aspnetcore/tree/704f7cb1d2cea33afb00c2097731216f121c2c73
|
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/aspnetcore/tree/4442a188f9200a57635373dcd640893c0e8dcc78
|
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/aspnetcore/tree/abc2c7226ff616316cd1e05d76e6c36b49ce06a1
|
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/aspnetcore/tree/d3aba8fe1a0d0f5c145506f292b72ea9d28406fc
|
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/aspnetcore/tree/5bae930797f60d2d04f3b1df6a33eaca85fc5f28
|
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/aspnetcore/tree/f736effe82a61eb6f5eba46e4173eae3b7d3dffd
|
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/aspnetcore/tree/de35e2b0a0d8d5d1e307907983a6838da1092898
|
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/aspnetcore/tree/c70204ae3c91d2b48fa6d9b92b62265f368421b4
|
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/aspnetcore/tree/763b4ef31ca4df6dae07c7ee8f39ea259b6980fa
|
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/aspnetcore/tree/f5084525411d53b81d9950b68616117750b674d4
|
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/2db1f5ee2bdda2e8d873769325fabede32e420e0
|
3 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.14)
- System.Memory (>= 4.5.5)
- System.Threading.Tasks.Extensions (>= 4.5.4)
.NET 8.0
- No dependencies.
.NET 9.0
- No dependencies.
.NET Standard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.14)
- System.Memory (>= 4.5.5)
- System.Threading.Tasks.Extensions (>= 4.5.4)
| Version | Downloads | Last updated |
|---|---|---|
| 11.0.0-preview.2.26159.112 | 1 | 2026/3/25 |
| 11.0.0-preview.1.26104.118 | 1 | 2026/2/21 |
| 10.0.5 | 2 | 2026/3/23 |
| 10.0.4 | 1 | 2026/3/25 |
| 10.0.3 | 1 | 2026/2/20 |
| 10.0.2 | 2 | 2026/1/22 |
| 10.0.1 | 2 | 2026/1/26 |
| 10.0.0 | 3 | 2026/1/22 |
| 10.0.0-rc.2.25502.107 | 2 | 2026/1/22 |
| 10.0.0-rc.1.25451.107 | 2 | 2026/1/22 |
| 10.0.0-preview.7.25380.108 | 2 | 2026/1/22 |
| 10.0.0-preview.6.25358.103 | 2 | 2026/1/22 |
| 10.0.0-preview.5.25277.114 | 2 | 2026/1/22 |
| 10.0.0-preview.4.25258.110 | 1 | 2026/3/25 |
| 10.0.0-preview.3.25171.5 | 2 | 2026/1/22 |
| 10.0.0-preview.2.25163.2 | 2 | 2026/1/22 |
| 10.0.0-preview.1.25080.5 | 2 | 2026/1/22 |
| 9.0.14 | 1 | 2026/3/25 |
| 9.0.13 | 1 | 2026/2/20 |
| 9.0.12 | 3 | 2026/1/22 |
| 9.0.11 | 1 | 2026/3/25 |
| 9.0.10 | 2 | 2026/1/22 |
| 9.0.9 | 3 | 2026/1/22 |
| 9.0.8 | 2 | 2026/1/22 |
| 9.0.7 | 2 | 2026/1/22 |
| 9.0.6 | 2 | 2026/1/22 |
| 9.0.5 | 2 | 2026/1/22 |
| 9.0.4 | 2 | 2026/1/22 |
| 9.0.3 | 2 | 2026/1/22 |
| 9.0.2 | 2 | 2026/1/22 |
| 9.0.1 | 1 | 2026/3/25 |
| 9.0.0 | 2 | 2026/1/22 |
| 9.0.0-rc.2.24473.5 | 1 | 2026/3/25 |
| 9.0.0-rc.1.24431.7 | 1 | 2026/3/25 |
| 9.0.0-preview.7.24405.7 | 2 | 2026/1/22 |
| 9.0.0-preview.6.24327.7 | 2 | 2026/1/22 |