nostr-websocket-utils
Version:
Robust WebSocket utilities for Nostr applications with automatic reconnection, supporting both ESM and CommonJS. Features channel-based messaging, heartbeat monitoring, message queueing, and comprehensive error handling with type-safe handlers.
29 lines • 710 B
TypeScript
/**
* @file WebSocket server implementation
* @module core/server
*/
import { NostrWSServerOptions } from '../types/websocket.js';
/**
* NostrWSServer class for handling WebSocket connections
*/
export declare class NostrWSServer {
private wss;
private options;
private rateLimiter?;
private pingInterval?;
constructor(options: NostrWSServerOptions);
/**
* Set up WebSocket server event handlers
*/
private setupServer;
private handleMessage;
/**
* Start ping interval to check client connections
*/
private startPingInterval;
/**
* Stop the server and clean up resources
*/
stop(): void;
}
//# sourceMappingURL=server.d.ts.map