Class Transport
🏭 Constructors
constructor
new Transport(options: TransportOptions): Transport
Parameters
- options:
TransportOptions
Return Type
Transport
Defined in: packages/discord-rpc/structures/Transport.ts:271
🏷️ Properties
client readonly
client: Client
Defined in: packages/discord-rpc/structures/Transport.ts:265
🔑 Accessors
isConnected
Defined in: packages/discord-rpc/structures/Transport.ts:267
🔧 Methods
addListener
addListener(event: E, listener: TransportEvents[E]): Transport
Parameters
- event:
E
- listener:
TransportEvents[E]
Return Type
Transport
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).addListener
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:8
close abstract
close(): Promise<void>
Return Type
Promise<void>
Defined in: packages/discord-rpc/structures/Transport.ts:280
connect abstract
connect(): Promise<void>
Return Type
Promise<void>
Defined in: packages/discord-rpc/structures/Transport.ts:277
emit
emit(event: E, args: Parameters<TransportEvents[E]>): boolean
Parameters
- event:
E
- args:
Parameters<TransportEvents[E]>
Return Type
boolean
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).emit
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:18
eventNames
eventNames(): (string | symbol)[]
Return Type
(string | symbol)[]
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).eventNames
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:19
getMaxListeners
getMaxListeners(): number
Return Type
number
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).getMaxListeners
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:24
listenerCount
listenerCount(event: E): number
Parameters
- event:
E
Return Type
number
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).listenerCount
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:22
listeners
listeners(event: E): TransportEvents[E][]
Parameters
- event:
E
Return Type
TransportEvents[E][]
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).listeners
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:21
off
off(event: E, listener: TransportEvents[E]): Transport
Parameters
- event:
E
- listener:
TransportEvents[E]
Return Type
Transport
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).off
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:14
on
on(event: E, listener: TransportEvents[E]): Transport
Parameters
- event:
E
- listener:
TransportEvents[E]
Return Type
Transport
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).on
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:9
once
once(event: E, listener: TransportEvents[E]): Transport
Parameters
- event:
E
- listener:
TransportEvents[E]
Return Type
Transport
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).once
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:10
ping abstract
ping(): void
Return Type
void
Defined in: packages/discord-rpc/structures/Transport.ts:279
prependListener
prependListener(event: E, listener: TransportEvents[E]): Transport
Parameters
- event:
E
- listener:
TransportEvents[E]
Return Type
Transport
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).prependListener
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:11
prependOnceListener
prependOnceListener(event: E, listener: TransportEvents[E]): Transport
Parameters
- event:
E
- listener:
TransportEvents[E]
Return Type
Transport
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).prependOnceListener
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:12
rawListeners
rawListeners(event: E): TransportEvents[E][]
Parameters
- event:
E
Return Type
TransportEvents[E][]
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).rawListeners
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:20
removeAllListeners
removeAllListeners(event: E): Transport
Parameters
- event:
E
Return Type
Transport
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).removeAllListeners
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:15
removeListener
removeListener(event: E, listener: TransportEvents[E]): Transport
Parameters
- event:
E
- listener:
TransportEvents[E]
Return Type
Transport
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).removeListener
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:16
send abstract
send(data: any): void
Parameters
- data:
any
Return Type
void
Defined in: packages/discord-rpc/structures/Transport.ts:278
setMaxListeners
setMaxListeners(maxListeners: number): Transport
Parameters
- maxListeners:
number
Return Type
Transport
Inherited from: (EventEmitter as new () => TypedEmitter<TransportEvents>).setMaxListeners
Defined in: packages/discord-rpc/utils/TypedEmitter.ts:25