start the path to rust
This commit is contained in:
48
dist_ts/mail/delivery/smtpclient/connection-manager.d.ts
vendored
Normal file
48
dist_ts/mail/delivery/smtpclient/connection-manager.d.ts
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* SMTP Client Connection Manager
|
||||
* Connection pooling and lifecycle management
|
||||
*/
|
||||
import { EventEmitter } from 'node:events';
|
||||
import type { ISmtpClientOptions, ISmtpConnection, IConnectionPoolStatus } from './interfaces.js';
|
||||
export declare class ConnectionManager extends EventEmitter {
|
||||
private options;
|
||||
private connections;
|
||||
private pendingConnections;
|
||||
private idleTimeout;
|
||||
constructor(options: ISmtpClientOptions);
|
||||
/**
|
||||
* Get or create a connection
|
||||
*/
|
||||
getConnection(): Promise<ISmtpConnection>;
|
||||
/**
|
||||
* Create a new connection
|
||||
*/
|
||||
createConnection(): Promise<ISmtpConnection>;
|
||||
/**
|
||||
* Release a connection back to the pool or close it
|
||||
*/
|
||||
releaseConnection(connection: ISmtpConnection): void;
|
||||
/**
|
||||
* Close a specific connection
|
||||
*/
|
||||
closeConnection(connection: ISmtpConnection): void;
|
||||
/**
|
||||
* Close all connections
|
||||
*/
|
||||
closeAllConnections(): void;
|
||||
/**
|
||||
* Get connection pool status
|
||||
*/
|
||||
getPoolStatus(): IConnectionPoolStatus;
|
||||
/**
|
||||
* Update connection activity timestamp
|
||||
*/
|
||||
updateActivity(connection: ISmtpConnection): void;
|
||||
private establishSocket;
|
||||
private setupSocketHandlers;
|
||||
private findIdleConnection;
|
||||
private shouldReuseConnection;
|
||||
private getActiveConnectionCount;
|
||||
private getConnectionId;
|
||||
private setupIdleCleanup;
|
||||
}
|
||||
Reference in New Issue
Block a user