kitejs
Version:
the rpc framework Kite for Node.js
29 lines (23 loc) • 517 B
text/typescript
/**
* @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;
}