import { RoleType } from "./proto"; export declare class GroupMgr { static create(host: string, port: number, roleId: string, groupId: string, score: number, info: any): GroupMgr; private host; private port; private selfInfo; private groupId; private groupInfo; private event; private socket; constructor(host: string, port: number); init(): Promise; private onConnection; get isMaster(): boolean; getRole(roleId: string): number; get masterRoleId(): string; get roleId(): string; private hellback; private onsayhellotiemout; sayhello(data: { roleId: string; groupId: string; [x: string]: any; }): Promise<{ role: RoleType; roles: { [type: number]: string[]; }; }>; private onData; private onClose; close(): void; private handle; joinGroup(roleId: string, groupId: string, score: number, info: any): boolean; private _pushData; pushMsg(targetId: string, type: 'answer' | 'request', cmd: number, info: any, roleId: string, extId?: string): boolean; pushBroadcast(type: 'control', cmd: number, info: any, roleId: string, extId?: string): boolean; private updateSayhello; private onInit; private parseRole; private onJoin; private onLeave; private onRoleResult; private onTalk; on(event: 'connection', listener: (...args: any[]) => void): this; on(event: 'open', listener: (...args: any[]) => void): this; on(event: 'data', listener: (srcId: string, info: { [key: string]: any; }) => void): this; on(event: 'close', listener: (...args: any[]) => void): this; on(event: 'error', listener: (...args: any[]) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; once(event: 'connection', listener: (...args: any[]) => void): this; once(event: 'open', listener: (...args: any[]) => void): this; once(event: 'data', listener: (srcId: string, info: { [key: string]: any; }) => void): this; once(event: 'close', listener: (...args: any[]) => void): this; once(event: 'error', listener: (...args: any[]) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; off(event: string | symbol, listener: (...args: any[]) => void): this; }