/**
 * @author xiangshouding
 * @file protocol/protocol.ts
 */

export class Address {

    constructor(
        protected host: string = '127.0.0.1',
        protected port: number = 5099
    ) {}

    public getHost() {
        return this.host;
    }

    public getPort() {
        return this.port;
    }

    public getAddress() {
        return this.host + ':' + this.port;
    }
}

export interface Protocol {
    createConnection() : any;
    request(cb: (err: any, service: any, conn: any) => void) : any;
}