/** * TCP server: accept connections, delegate to connection handler. */ import type { Server, Socket } from 'node:net'; import type { CommandPolicy, CompiledCommandPolicy } from '../commands/registry.ts'; import type { PubSubBroker } from '../pubsub/broker.ts'; import type { ScriptingPlugin } from '../scripting/plugin.ts'; import type { Engine } from '../types.ts'; export interface CreateServerOptions { engine: Engine; /** Default 6379. */ port?: number; /** Default '0.0.0.0'. */ host?: string; /** If provided, each accepted socket is added here (for graceful shutdown). */ connections?: Set | null; /** Optional: command rename/disable policy. */ commandPolicy?: CommandPolicy | CompiledCommandPolicy | null; /** Pub/Sub broker shared by all connections. */ pubSub?: PubSubBroker; /** Prepared scripting plugin owned by this server. */ scripting?: ScriptingPlugin | null; scriptingOwner?: object; } export declare function createServer({ engine, port, host, connections, commandPolicy, pubSub, scripting, scriptingOwner }: CreateServerOptions): Server;