Skip to content

Commit 78c9fda

Browse files
committed
[v3.0.0] Lib.AspNetCore.ServerSentEvents
1 parent 030e5f9 commit 78c9fda

File tree

6 files changed

+17
-5
lines changed

6 files changed

+17
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Lib.AspNetCore.ServerSentEvents 3.0.0
2+
### Additions and Changes
3+
- Added support for client connected and disconnected events.
4+
- Improved support for CancellationToken in asynchronous operations.
5+
- Hot synchronous path performance improvements.
6+
17
## Lib.AspNetCore.ServerSentEvents 2.0.0
28
### Additions and Changes
39
- Upgraded to .NET Standard 2.0 and ASP.NET Core 2.0.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>netcoreapp2.0</TargetFramework>
3+
<TargetFramework>netcoreapp2.1</TargetFramework>
44
</PropertyGroup>
55
<ItemGroup>
66
<None Remove="log.txt" />
@@ -10,6 +10,6 @@
1010
</ItemGroup>
1111
<ItemGroup>
1212
<PackageReference Include="docfx.console" Version="2.36.2" />
13-
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.8" />
13+
<PackageReference Include="Microsoft.AspNetCore.All" />
1414
</ItemGroup>
1515
</Project>

DocFx.AspNetCore.ServerSentEvents/articles/getting-started.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ The `IServerSentEventsService.GetClients()` method returns list of all currently
8888

8989
## Handling Auto Reconnect
9090

91-
Server-Sent Events provide auto reconnect and tracking of the last seen message functionality. If the connection is dropped, client will automatically reconnect to the server and optionally advertise the identifier of the last seen message. This allows for retransmission of lost messages. In order to use this mechanism the `OnReconnectAsync` method must be overridden when delivering from `Server​Sent​Events​Service`. When client reconnects the method will be called with `IServerSentEventsClient` representing the client and the identifier of last message which client has received.
91+
Server-Sent Events provide auto reconnect and tracking of the last seen message functionality. If the connection is dropped, client will automatically reconnect to the server and optionally advertise the identifier of the last seen message. This allows for retransmission of lost messages.
92+
93+
In order to use this mechanism one can subscribe to `IServerSentEventsService.ClientConnected` event. When client reconnects the event will be raised and `ServerSentEventsClientConnectedArgs.LastEventId` will provide an identifier of last message which client has received. At this point `ServerSentEventsClientConnectedArgs.Client` can be used to send any missed messages.
94+
95+
Alternative approach is to override `OnReconnectAsync` method when delivering from `Server​Sent​Events​Service`. When client reconnects the method will be called with `IServerSentEventsClient` representing the client and an identifier of last message which client has received. When overriding `OnReconnectAsync` the base implementation should be called as it's responsible for triggering `ClientConnected` event.
9296

9397
### Changing Reconnect Interval
9498

DocFx.AspNetCore.ServerSentEvents/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ There are some blog posts available which describe implementation details and so
2222

2323
- [Server-Sent Events (SSE) support for ASP.NET Core](https://www.tpeczek.com/2017/02/server-sent-events-sse-support-for.html)
2424
- [Server-Sent Events (or WebSockets) broadcasting in load balancing scenario with Redis](https://www.tpeczek.com/2017/09/server-sent-events-or-websockets.html)
25+
- [Server-Sent Events and ASP.NET Core - You may need keep alives](https://www.tpeczek.com/2018/08/server-sent-events-and-aspnet-core-you_9.html)
2526

2627
## Donating
2728

Lib.AspNetCore.ServerSentEvents/Lib.AspNetCore.ServerSentEvents.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<Description>Lib.AspNetCore.ServerSentEvents is a library which provides Server-Sent Events (SSE) support for ASP.NET Core</Description>
44
<Copyright>Copyright © 2017 - 2018 Tomasz Pęczek</Copyright>
5-
<VersionPrefix>2.0.0</VersionPrefix>
5+
<VersionPrefix>3.0.0</VersionPrefix>
66
<Authors>Tomasz Pęczek</Authors>
77
<TargetFramework>netstandard2.0</TargetFramework>
88
<AssemblyTitle>Lib.AspNetCore.ServerSentEvents</AssemblyTitle>

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ There are some blog posts available which describe implementation details and so
2525

2626
- [Server-Sent Events (SSE) support for ASP.NET Core](https://www.tpeczek.com/2017/02/server-sent-events-sse-support-for.html)
2727
- [Server-Sent Events (or WebSockets) broadcasting in load balancing scenario with Redis](https://www.tpeczek.com/2017/09/server-sent-events-or-websockets.html)
28+
- [Server-Sent Events and ASP.NET Core - You may need keep alives](https://www.tpeczek.com/2018/08/server-sent-events-and-aspnet-core-you_9.html)
2829

2930
## Donating
3031

0 commit comments

Comments
 (0)