Function BinaryMessageBus
- BinaryMessageBus<T>(send: ((message: Uint8Array) => void)): {
__processMessages: ((messages: Uint8Array[]) => void);
emit: (<K>(message: K, value: Uint8Array) => void);
on: (<K>(message: K, callback: ((value: Uint8Array, sender: string) => void)) => void);
}
-
Parameters
-
send: ((message: Uint8Array) => void)
-
- (message: Uint8Array): void
-
Returns void
Returns {
__processMessages: ((messages: Uint8Array[]) => void);
emit: (<K>(message: K, value: Uint8Array) => void);
on: (<K>(message: K, callback: ((value: Uint8Array, sender: string) => void)) => void);
}
-
__processMessages: ((messages: Uint8Array[]) => void)
-
- (messages: Uint8Array[]): void
-
Returns void
-
emit: (<K>(message: K, value: Uint8Array) => void)
-
- <K>(message: K, value: Uint8Array): void
-
Parameters
-
message: K
-
value: Uint8Array
Returns void
-
on: (<K>(message: K, callback: ((value: Uint8Array, sender: string) => void)) => void)
-
- <K>(message: K, callback: ((value: Uint8Array, sender: string) => void)): void
-
Parameters
-
message: K
-
callback: ((value: Uint8Array, sender: string) => void)
-
- (value: Uint8Array, sender: string): void
-
Parameters
-
value: Uint8Array
-
sender: string
Returns void
Returns void