This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

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

fileWatcher IFileWatcher
lifetime IHostApplicationLifetime
logger ILogger<LiveReloadServer>

Methods

DisposeAsync

#
public ValueTask DisposeAsync()

Disposes the debounce timer and closes any open client sockets.

Returns

ValueTask

Pennington.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)
; }