import { EventEmitter } from "eventemitter3"; import { ParticipantAttributes } from "./ParticipantAttributes"; import { EntityId, GuidPrefix, Locator, LoggerService, ProtocolVersion, VendorId } from "./common"; import { EndpointAttributes, EndpointAttributesWithTopic, ReaderView, SubscribeOpts, UserData, Writer } from "./routing"; import { UdpSocket, UdpSocketCreate, UdpSocketOptions } from "./transport"; export declare type ParticipantTuning = { keepAliveMs?: number; }; export interface ParticipantEvents { error: (error: Error) => void; discoveredParticipant: (participant: ParticipantAttributes) => void; discoveredPublication: (endpoint: EndpointAttributes) => void; discoveredSubscription: (endpoint: EndpointAttributes) => void; userData: (userData: UserData) => void; } export declare class Participant extends EventEmitter { readonly name: string; readonly attributes: ParticipantAttributes; private readonly _addresses; private readonly _udpSocketCreate; private readonly _udpSocketOptions; private readonly _log?; private readonly _participants; private readonly _writers; private readonly _subscriptions; private _running; private _unicastSocket?; private _multicastSocket?; private _multicastLocator; private nextEndpointId; private _receivedBytes; private _keepAliveMs; private _keepAliveTimer?; get running(): boolean; get unicastSocket(): UdpSocket | undefined; get multicastSocket(): UdpSocket | undefined; get receivedBytes(): number; constructor(options: { name: string; addresses: string[]; domainId?: number; guidPrefix?: GuidPrefix; udpSocketCreate: UdpSocketCreate; udpSocketOptions?: UdpSocketOptions; log?: LoggerService; protocolVersion?: ProtocolVersion; vendorId?: VendorId; tuning?: ParticipantTuning; }); start(): Promise; shutdown(): Promise; sendAlive(manual?: boolean): Promise; sendDefaultChanges(writer: Writer): Promise; sendMetatrafficChanges(writer: Writer): Promise; sendChangesTo(reader: ReaderView, writer: Writer, locators: Locator[]): Promise; subscribe(opts: SubscribeOpts): EntityId; unsubscribe(readerEntityId: EntityId): boolean; advertiseParticipant(attributes: ParticipantAttributes): Promise; broadcastParticipant(attributes: ParticipantAttributes): Promise; unadvertiseParticipant(guidPrefix: GuidPrefix): Promise; topicWriters(): EndpointAttributesWithTopic[]; private sendAckNackTo; private sendNackFragTo; private sendGroupToUdp; private addBuiltinWriter; private getReaders; private readerName; private writerName; private handleError; private handleUdpMessage; private handleHeartbeat; private handleGap; private handleAckNack; private handleDataMsg; private handleData; private handleDataFrag; private handleHeartbeatFrag; private handleNackFrag; private sendInitialHeartbeats; private handleParticipant; private handleParticipantMessage; private handleUserData; private handlePublication; private handleSubscription; } //# sourceMappingURL=Participant.d.ts.map