File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,23 @@ import url from 'url';
55import { EventEmitter } from 'events' ;
66
77class EventStream extends EventEmitter {
8- constructor ( uri , token ) {
8+ /**
9+ *
10+ * @param {String } uri Event stream URL
11+ * @param {String } token Particle Access Token
12+ * @param {Object } options
13+ * @param {Particle } options.headers key/val http headers to pass along
14+ * @hideconstructor
15+ */
16+ constructor ( uri , token , options = { headers :{ } } ) {
917 super ( ) ;
1018 this . uri = uri ;
1119 this . token = token ;
1220 this . reconnectInterval = 2000 ;
1321 this . timeout = 13000 ; // keep alive can be sent up to 12 seconds after last event
1422 this . data = '' ;
1523 this . buf = '' ;
24+ this . options = options ;
1625
1726 this . parse = this . parse . bind ( this ) ;
1827 this . end = this . end . bind ( this ) ;
You can’t perform that action at this time.
0 commit comments