1 | import { StompHeaders } from './stomp-headers';
|
2 |
|
3 | /**
|
4 | * It represents a STOMP frame. Many of the callbacks pass an IFrame received from
|
5 | * the STOMP broker. For advanced usage you might need to access [headers]{@link IFrame#headers}.
|
6 | *
|
7 | * Part of `@stomp/stompjs`.
|
8 | *
|
9 | * {@link IMessage} is an extended IFrame.
|
10 | */
|
11 | export interface IFrame {
|
12 | /**
|
13 | * STOMP Command
|
14 | */
|
15 | command: string;
|
16 |
|
17 | /**
|
18 | * Headers, key value pairs.
|
19 | */
|
20 | headers: StompHeaders;
|
21 |
|
22 | /**
|
23 | * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).
|
24 | */
|
25 | isBinaryBody: boolean;
|
26 |
|
27 | /**
|
28 | * body of the frame as string
|
29 | */
|
30 | readonly body: string;
|
31 |
|
32 | /**
|
33 | * body as Uint8Array
|
34 | */
|
35 | readonly binaryBody: Uint8Array;
|
36 | }
|
37 |
|
38 | /**
|
39 | * Alias for {@link IFrame}
|
40 | */
|
41 | export type Frame = IFrame;
|