-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconstants.js
50 lines (42 loc) · 1.19 KB
/
constants.js
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
43
44
45
46
47
48
49
50
'use strict';
const {
P2P_SESSION_ACK
} = require('@fabric/core/constants');
// engine
const TICK_INTERVAL = 1000;
const SESSION_SEED = '79084a7963fc1761e8f6871d6aa704c4922316030af4aa5a076dde35fc0b6857';
// auth
const HTTP_IDENTITY_HEADER_NAME = 'X-Fabric-Identity';
const HTTP_SIGNATURE_HEADER_NAME = 'X-Fabric-Signature';
const HTTP_IDENTITY_HEADER_NAME_LOWER = HTTP_IDENTITY_HEADER_NAME.toLowerCase();
const HTTP_SIGNATURE_HEADER_NAME_LOWER = HTTP_SIGNATURE_HEADER_NAME.toLowerCase();
// http
const HTTP_CLIENT_PORT = 80;
const HTTP_SERVER_PORT = 9999;
const PREFERRED_CONTENT_TYPE = 'application/json';
// https
const HTTPS_CLIENT_PORT = 443;
const HTTPS_SERVER_PORT = 19999;
// websockets
const MAXIMUM_PING = 10000;
const WEBSOCKET_KEEPALIVE = 600000; // 10 minutes
// browser / dom
const BROWSER_TARGET = '#browser-content';
// exports
module.exports = {
TICK_INTERVAL,
SESSION_SEED,
HTTP_IDENTITY_HEADER_NAME,
HTTP_SIGNATURE_HEADER_NAME,
HTTP_IDENTITY_HEADER_NAME_LOWER,
HTTP_SIGNATURE_HEADER_NAME_LOWER,
HTTP_CLIENT_PORT,
HTTP_SERVER_PORT,
HTTPS_CLIENT_PORT,
HTTPS_SERVER_PORT,
MAXIMUM_PING,
WEBSOCKET_KEEPALIVE,
BROWSER_TARGET,
P2P_SESSION_ACK,
PREFERRED_CONTENT_TYPE
};