LiveReloadServer
Pennington.Infrastructure
Manages WebSocket connections for live reload during development. When watched files change, debounces rapid notifications and sends a single reload message to all connected browsers.
Constructors
LiveReloadServer
#public LiveReloadServer(IFileWatcher fileWatcher, IHostApplicationLifetime lifetime, ILogger<LiveReloadServer> logger = null)
Initializes the server and subscribes to watched-file change notifications.
Parameters
fileWatcherIFileWatcherlifetimeIHostApplicationLifetimeloggerILogger<LiveReloadServer>
Methods
DisposeAsync
#public ValueTask DisposeAsync()
Disposes the debounce timer and closes any open client sockets.
Returns
ValueTaskPennington.Infrastructure.LiveReloadServer
namespace Pennington.Infrastructure;
/// Manages WebSocket connections for live reload during development. When watched files change, debounces rapid notifications and sends a single reload message to all connected browsers.
public class LiveReloadServer
{
/// Disposes the debounce timer and closes any open client sockets.
public ValueTask DisposeAsync()
;
/// Initializes the server and subscribes to watched-file change notifications.
public LiveReloadServer(IFileWatcher fileWatcher, IHostApplicationLifetime lifetime, ILogger<LiveReloadServer> logger = null)
;
}