///
import { EventEmitter } from "stream";
import { PopCommand } from "../shared/PopCommand";
import { PopSocket } from "../shared/PopSocket";
import { PopServer } from "./PopServer";
import { PopServerSession } from "./PopServerSession";
import { PopServerStream } from "./PopServerStream";
export declare class PopServerConnection extends EventEmitter {
readonly server: PopServer;
readonly popSocket: PopSocket;
readonly session: PopServerSession;
udata: any;
protected stream: PopServerStream;
/**
* Constructs a new PopServerConnection.
* @param popSocket the socket.
*/
constructor(server: PopServer, popSocket: PopSocket, session: PopServerSession);
/**
* Begins the server connection (listens and sends initial line).
* @returns ourselves.
*/
begin(): Promise;
/**
* Gets called when the socket closed.
* @param had_error if there was an error (net-only).
*/
protected _handleClose(had_error: boolean): void;
/**
* Handles a single pop command.
* @param data the command date.
*/
protected _handleCommand(data: string): Promise;
/**
* Handles the QUIT command.
*/
protected _handleQuitCommand(): Promise;
/**
* Handles the NOOP command.
*/
protected _handleNoopCommand(): void;
/**
* Handles the capability command.
*/
protected _handleCapabilityCommand(): void;
/**
* Handles the TOP command.
* @param command the command.
*/
protected _handleTopCommand(command: PopCommand): Promise;
/**
* Handles the APOP command.
* @param command the command.
*/
protected _handleApopCommand(command: PopCommand): Promise;
/**
* Handles the RSET command.
*/
protected _handleResetCommand(): void;
/**
* Handles the LIST command.
* @param command the command.
*/
protected _handleListCommand(command: PopCommand): void;
/**
* Handles the DELE command.
* @param command the command.
*/
protected _handleDeleteCommand(command: PopCommand): void;
/**
* Handles the RETR command.
* @param command the command.
*/
protected _handleRetreiveCommand(command: PopCommand): Promise;
/**
* Handles the STAT command.
*/
protected _handleStatisticsCommand(): void;
/**
* Handles the UIDL command.
*/
protected _handleUidListCommand(command: PopCommand): void;
/**
* Handles the lang command.
* @param command the command.
*/
protected _handleLanguageCommand(command: PopCommand): void;
/**
* Handles the user command.
* @param command the command.
*/
protected _handleUserCommand(command: PopCommand): Promise;
/**
* Handles the pass command.
* @param command the command.
*/
protected _handle_pass(command: PopCommand): Promise;
/**
* Gets called when a command is not implemented.
*
* @param command the command.
*/
protected _handleNotImplemented(command: PopCommand): void;
}