System.Net.ServerSentEvents 10.0.0-rc.2.25502.107
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 |
|---|---|
|
mcpdotnet
.NET library for the Model Context Protocol (MCP)
|
19 |
|
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
|
23 |
|
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
|
23 |
|
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
|
19 |
|
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
|
19 |
|
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
|
17 |
|
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/af22effae4069a5dfb9b0735859de48820104f5b
|
22 |
|
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/b225d30209cf027c80b741d04efe1c54f2431b3c
|
18 |
|
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/b96167fbfe8bd45d94e4dcda42c7d09eb5745459
|
19 |
|
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
|
22 |
|
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
|
18 |
|
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
|
18 |
|
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/ed74665e773dd1ebea3289c5662d71c590305932
|
16 |
|
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
|
23 |
|
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
|
17 |
|
ModelContextProtocol
.NET SDK for the Model Context Protocol (MCP)
|
15 |
|
ModelContextProtocol
.NET SDK for the Model Context Protocol (MCP)
|
16 |
|
ModelContextProtocol
.NET SDK for the Model Context Protocol (MCP)
|
17 |
|
ModelContextProtocol
.NET SDK for the Model Context Protocol (MCP)
|
19 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.0-rc.2.25502.107)
- 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-rc.2.25502.107)
- System.Memory (>= 4.6.3)
- System.Threading.Tasks.Extensions (>= 4.6.3)
| Version | Downloads | Last updated |
|---|---|---|
| 10.0.0-rc.2.25502.107 | 5 | 10/16/2025 |
| 10.0.0-rc.1.25451.107 | 10 | 09/12/2025 |
| 10.0.0-preview.7.25380.108 | 7 | 08/16/2025 |
| 10.0.0-preview.6.25358.103 | 8 | 07/17/2025 |
| 10.0.0-preview.5.25277.114 | 14 | 06/09/2025 |
| 10.0.0-preview.4.25258.110 | 15 | 05/14/2025 |
| 10.0.0-preview.3.25171.5 | 19 | 04/12/2025 |
| 10.0.0-preview.2.25163.2 | 19 | 03/23/2025 |
| 10.0.0-preview.1.25080.5 | 19 | 03/03/2025 |
| 9.0.10 | 4 | 10/16/2025 |
| 9.0.9 | 6 | 09/13/2025 |
| 9.0.8 | 8 | 08/16/2025 |
| 9.0.7 | 9 | 07/10/2025 |
| 9.0.6 | 13 | 06/12/2025 |
| 9.0.5 | 17 | 05/16/2025 |
| 9.0.4 | 18 | 04/12/2025 |
| 9.0.3 | 16 | 03/28/2025 |
| 9.0.2 | 18 | 03/03/2025 |
| 9.0.1 | 17 | 01/30/2025 |
| 9.0.0 | 25 | 11/14/2024 |
| 9.0.0-rc.2.24473.5 | 22 | 11/14/2024 |
| 9.0.0-rc.1.24431.7 | 19 | 11/14/2024 |
| 9.0.0-preview.7.24405.7 | 21 | 11/14/2024 |
| 9.0.0-preview.6.24327.7 | 22 | 11/14/2024 |