-
Notifications
You must be signed in to change notification settings - Fork 251
/
rfc7395.ts
42 lines (38 loc) · 1.14 KB
/
rfc7395.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// ====================================================================
// RFC 7395: An Extensible Messaging and Presence Protocol (XMPP)
// Subprotocol for WebSocket
// --------------------------------------------------------------------
// Source: https://tools.ietf.org/html/rfc7395
// ====================================================================
import { attribute, DefinitionOptions, languageAttribute } from '../jxt';
import { NS_FRAMING } from '../Namespaces';
declare module './' {
export interface Stream {
seeOtherURI?: string;
}
}
const Protocol: DefinitionOptions[] = [
{
element: 'open',
fields: {
from: attribute('from'),
id: attribute('id'),
lang: languageAttribute(),
to: attribute('to'),
version: attribute('version')
},
namespace: NS_FRAMING,
path: 'stream',
type: 'open'
},
{
element: 'close',
fields: {
seeOtherURI: attribute('see-other-uri')
},
namespace: NS_FRAMING,
path: 'stream',
type: 'close'
}
];
export default Protocol;