This repository was archived by the owner on Sep 27, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): add sample config file
- Loading branch information
1 parent
2391a1f
commit 4bf58c5
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
} |