It allows you to create desktop applications with pure JavaScript by providing a runtime with rich native (operating system) APIs. Electron is a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. ScreencastR agent is a Electron based desktop application. In Real world scenarios, You may consider using peer to peer connection using WebRTC or other socket libraries for building effective screen sharing tool. The sample code for this article is just an experimental project for testing signalR streaming with IAsyncEnumerable. In this example, we will use client to server streaming to stream the desktop content to all the connected remote client viewers using signalR stream with the support of IAsyncEnumerable API. It is now super easy to implement asynchronous streaming with few lines of clean code.
Net Core 3.0 and C# 8 feature for asynchronous streaming. IAsyncEnumerable is the latest addition to. This may look very complex to implement asynchronous streaming just like writing the asynchronous method without async and await keyword. In my previous article, I have done server to client streaming with ChannelReader and ChannelWriter for streaming support. SignalR supports both server to client and client to server streaming.
R hub remote support how to#
In this article, we will see how to create simple screen sharing app using signalR streaming.