-
Notifications
You must be signed in to change notification settings - Fork 3
/
socket.js
66 lines (61 loc) · 1.92 KB
/
socket.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
'use strict';
/*
|--------------------------------------------------------------------------
| Websocket Config
|--------------------------------------------------------------------------
|
| Used by AdonisJs websocket server
|
*/
module.exports = {
/*
|--------------------------------------------------------------------------
| Path
|--------------------------------------------------------------------------
|
| The base path on which the websocket server will accept connections.
|
*/
path: '/adonis-ws',
/*
|--------------------------------------------------------------------------
| Server Interval
|--------------------------------------------------------------------------
|
| This interval is used to create a timer for identifying dead client
| connections.
|
*/
serverInterval: 30000,
/*
|--------------------------------------------------------------------------
| Server Attempts
|--------------------------------------------------------------------------
|
| Server attempts are used with serverInterval to identify dead client
| connections. A total of `serverAttempts` attmepts after `serverInterval`
| will be made before terminating the client connection.
|
*/
serverAttempts: 3,
/*
|--------------------------------------------------------------------------
| Client Interval
|--------------------------------------------------------------------------
|
| This interval is used by client to send ping frames to the server.
|
*/
clientInterval: 25000,
/*
|--------------------------------------------------------------------------
| Client Attempts
|--------------------------------------------------------------------------
|
| Clients attempts are number of times the client will attempt to send the
| ping, without receiving a pong from the server. After attempts have
| been elapsed, the client will consider server as dead.
|
*/
clientAttempts: 3
};