Skip to content
This repository was archived by the owner on Sep 27, 2021. It is now read-only.

Commit

Permalink
feat(config): add sample config file
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Mar 5, 2018
1 parent 2391a1f commit 4bf58c5
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions config/index.js
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
}

0 comments on commit 4bf58c5

Please sign in to comment.