///
///
import * as http from 'http';
import * as net from 'net';
import { Server } from './_server';
import { RuleResult } from './router';
/**
* base service abstract class
* @class Service
*/
export declare abstract class Service {
private m_pathname;
private m_dirname;
private m_extname;
private m_params;
private m_headers;
static type: string;
static public: boolean;
/**
* @type {String} 服务名称
*/
static readonly id: string;
/**
* @type {String} 服务名称
*/
get name(): string;
/**
* server
* @type {Server}
*/
readonly server: Server;
/**
* request of server
* @type {http.ServerRequest}
*/
readonly request: http.IncomingMessage;
/**
* @type {net.Stream}
*/
readonly socket: net.Socket;
/**
* request host
* @type {String}
*/
readonly host: string;
/**
* request path
* @type {String}
*/
readonly url: string;
/**
* no param url
* @type {String}
*/
get pathname(): string;
/**
* request path directory
* @type {String}
*/
get dirname(): string;
/**
* request extended name
* @type {String}
*/
get extname(): string;
/**
* url param list
* @type {Object}
*/
get params(): Dict;
get headers(): http.IncomingHttpHeaders;
/**
* @func setTimeout(value)
*/
setTimeout(value: number): void;
/**
* @constructor
* @arg req {http.ServerRequest}
*/
constructor(req: http.IncomingMessage);
/**
* authentication by default all, subclasses override
* @param {Function} cb
* @param {Object} info
*/
abstract onRequestAuth(info: RuleResult): Promise | boolean;
}
/**
* typescript decorator
*/
export declare function internalApi(target: any, name?: string): void;