System.Net.ServerSentEvents 10.0.0-preview.4.25258.110
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/aspnetcore/tree/087328de5f1e0067be48d87295ae8d92064a1535
|
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/280c613963a1768b810d09f32c998fe4490855e9
|
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/4442a188f9200a57635373dcd640893c0e8dcc78
|
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/5bae930797f60d2d04f3b1df6a33eaca85fc5f28
|
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/aspnetcore/tree/baa6b294e728e6171378b4e8c52e42e7c4d4ed63
|
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/aspnetcore/tree/c70204ae3c91d2b48fa6d9b92b62265f368421b4
|
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/aspnetcore/tree/d3aba8fe1a0d0f5c145506f292b72ea9d28406fc
|
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/aspnetcore/tree/de35e2b0a0d8d5d1e307907983a6838da1092898
|
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/aspnetcore/tree/f5084525411d53b81d9950b68616117750b674d4
|
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/aspnetcore/tree/f6b3a5da75eb405046889a5447ec9b14cc29d285
|
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/f736effe82a61eb6f5eba46e4173eae3b7d3dffd
|
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/2db1f5ee2bdda2e8d873769325fabede32e420e0
|
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/30000d883e06c122311a66894579bc12329a09d4
|
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/75972a5ba730bdaf7cf3a34f528ab0f5c7f05183
|
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/80d3e14f5e08b4888f464e3cd0d0b2445b63ec46
|
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/87bc0b04e21d786669142109a5128c95618b75ed
|
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/a612c2a1056fe3265387ae3ff7c94eba1505caf9
|
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/c22dcd0c7a78d095a94d20e59ec0271b9924c82c
|
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/fad253f51b461736dfd3cd9c15977bb7493becef
|
5 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.0-preview.4.25258.110)
- 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.0-preview.4.25258.110)
- System.Memory (>= 4.6.3)
- System.Threading.Tasks.Extensions (>= 4.6.3)
| Version | Downloads | Last updated |
|---|---|---|
| 11.0.0-preview.3.26207.106 | 2 | 2026/4/19 |
| 11.0.0-preview.2.26159.112 | 3 | 2026/4/13 |
| 11.0.0-preview.1.26104.118 | 3 | 2026/4/13 |
| 10.0.7 | 1 | 2026/4/30 |
| 10.0.6 | 2 | 2026/4/19 |
| 10.0.5 | 3 | 2026/4/13 |
| 10.0.4 | 4 | 2026/4/13 |
| 10.0.3 | 3 | 2026/4/13 |
| 10.0.2 | 4 | 2026/4/13 |
| 10.0.1 | 3 | 2026/4/13 |
| 10.0.0 | 4 | 2026/4/13 |
| 10.0.0-rc.2.25502.107 | 4 | 2026/4/13 |
| 10.0.0-rc.1.25451.107 | 4 | 2026/4/13 |
| 10.0.0-preview.7.25380.108 | 4 | 2026/4/13 |
| 10.0.0-preview.6.25358.103 | 3 | 2026/4/13 |
| 10.0.0-preview.5.25277.114 | 3 | 2026/4/13 |
| 10.0.0-preview.4.25258.110 | 3 | 2026/4/13 |
| 10.0.0-preview.3.25171.5 | 3 | 2026/4/13 |
| 10.0.0-preview.2.25163.2 | 4 | 2026/4/13 |
| 10.0.0-preview.1.25080.5 | 4 | 2026/4/13 |
| 9.0.15 | 2 | 2026/4/19 |
| 9.0.14 | 4 | 2026/4/13 |
| 9.0.13 | 4 | 2026/4/13 |
| 9.0.12 | 3 | 2026/4/13 |
| 9.0.11 | 4 | 2026/4/13 |
| 9.0.10 | 4 | 2026/4/13 |
| 9.0.9 | 3 | 2026/4/13 |
| 9.0.8 | 4 | 2026/4/13 |
| 9.0.7 | 4 | 2026/4/13 |
| 9.0.6 | 3 | 2026/4/13 |
| 9.0.5 | 4 | 2026/4/13 |
| 9.0.4 | 4 | 2026/4/13 |
| 9.0.3 | 4 | 2026/4/13 |
| 9.0.2 | 4 | 2026/4/13 |
| 9.0.1 | 3 | 2026/4/13 |
| 9.0.0 | 3 | 2026/4/13 |
| 9.0.0-rc.2.24473.5 | 3 | 2026/4/13 |
| 9.0.0-rc.1.24431.7 | 3 | 2026/4/13 |
| 9.0.0-preview.7.24405.7 | 4 | 2026/4/13 |
| 9.0.0-preview.6.24327.7 | 3 | 2026/4/13 |