Created
May 4, 2020 19:02
-
-
Save Odonno/f9e596f627083b21a6dbdef9d798068f to your computer and use it in GitHub Desktop.
ServerToClient.Basic.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Basic implementation of server-to-client | |
public ChannelReader<Weather> RealtimeWeather() | |
{ | |
var channel = Channel.CreateUnbounded<Weather>(); | |
_ = WriteItemsAsync(channel.Writer, count, delay); | |
return channel.Reader; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment