This repository was archived by the owner on Jul 30, 2024. It is now read-only.
File tree 1 file changed +4
-6
lines changed
app/current/src/main/scala/io/scalajs/nodejs/http 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
package io .scalajs .nodejs
2
2
package http
3
3
4
+ import io .scalajs .nodejs .events .IEventEmitter
4
5
import io .scalajs .util .PromiseHelper ._
5
6
6
7
import scala .concurrent .Future
@@ -16,16 +17,11 @@ import scala.scalajs.js.annotation.JSImport
16
17
*/
17
18
@ js.native
18
19
@ JSImport (" http" , " Agent" )
19
- class Agent (options : AgentOptions = js.native) extends js. Object {
20
+ class Agent (options : AgentOptions = js.native) extends IEventEmitter {
20
21
// ///////////////////////////////////////////////////////////////////////////////
21
22
// Properties
22
23
// ///////////////////////////////////////////////////////////////////////////////
23
24
24
- /**
25
- * The agent's domain name
26
- */
27
- def domain : String = js.native
28
-
29
25
/**
30
26
* An object which contains arrays of sockets currently awaiting use by the Agent when HTTP KeepAlive is used. Do not modify.
31
27
* @example agent.freeSockets
@@ -112,5 +108,7 @@ object Agent {
112
108
def createConnectionFuture (options : ConnectionOptions ): Future [js.Any ] = {
113
109
promiseWithError1[Error , js.Any ](agent.createConnection(options, _))
114
110
}
111
+
112
+ @ inline def onKeylog (handler : () => Any ): agent.type = agent.on(" keylog" , handler)
115
113
}
116
114
}
You can’t perform that action at this time.
0 commit comments