@codebolt/codeboltjs 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/Readme.md +47 -0
  2. package/{modules → dist}/agentlib/agent.js +4 -4
  3. package/{modules → dist}/agentlib/usermessage.js +3 -3
  4. package/dist/utils.d.ts +5 -0
  5. package/{utils.js → dist/utils.js} +4 -4
  6. package/package.json +17 -8
  7. package/.codebolt/chat.json +0 -1
  8. package/.codebolt/debug.json +0 -1
  9. package/.codebolt/projectState.json +0 -127
  10. package/.codebolt/tasks.json +0 -1
  11. package/.codeboltconfig.yaml +0 -0
  12. package/.github/workflows/publish-to-npm.yml +0 -20
  13. package/bkp/toolBox.bkp.ts +0 -1162
  14. package/docs/.nojekyll +0 -1
  15. package/docs/assets/highlight.css +0 -127
  16. package/docs/assets/icons.js +0 -15
  17. package/docs/assets/icons.svg +0 -1
  18. package/docs/assets/main.js +0 -59
  19. package/docs/assets/navigation.js +0 -1
  20. package/docs/assets/search.js +0 -1
  21. package/docs/assets/style.css +0 -1412
  22. package/docs/classes/_internal_.Agent.html +0 -318
  23. package/docs/classes/_internal_.AsyncResource.html +0 -44
  24. package/docs/classes/_internal_.Blob.html +0 -33
  25. package/docs/classes/_internal_.ClientRequest.html +0 -506
  26. package/docs/classes/_internal_.Codebolt.html +0 -315
  27. package/docs/classes/_internal_.CustomEventEmitter-1.html +0 -248
  28. package/docs/classes/_internal_.CustomEventEmitter.html +0 -248
  29. package/docs/classes/_internal_.Duplex.html +0 -690
  30. package/docs/classes/_internal_.EventEmitter-1.html +0 -254
  31. package/docs/classes/_internal_.EventEmitter.EventEmitterAsyncResource.html +0 -268
  32. package/docs/classes/_internal_.IncomingMessage.html +0 -661
  33. package/docs/classes/_internal_.KeyObject.html +0 -76
  34. package/docs/classes/_internal_.OutgoingMessage.html +0 -491
  35. package/docs/classes/_internal_.Readable.html +0 -551
  36. package/docs/classes/_internal_.ReadableBase.html +0 -551
  37. package/docs/classes/_internal_.Server-1.html +0 -416
  38. package/docs/classes/_internal_.Server-2.html +0 -326
  39. package/docs/classes/_internal_.Server-3.html +0 -353
  40. package/docs/classes/_internal_.Server.html +0 -390
  41. package/docs/classes/_internal_.ServerResponse.html +0 -569
  42. package/docs/classes/_internal_.Socket.html +0 -791
  43. package/docs/classes/_internal_.Stream.html +0 -256
  44. package/docs/classes/_internal_.TLSSocket.html +0 -947
  45. package/docs/classes/_internal_.URL.html +0 -140
  46. package/docs/classes/_internal_.URLSearchParams.html +0 -68
  47. package/docs/classes/_internal_.WebSocket-1.html +0 -297
  48. package/docs/classes/_internal_.WebSocket.Server.html +0 -261
  49. package/docs/classes/_internal_.Writable.html +0 -394
  50. package/docs/classes/_internal_.WritableBase.html +0 -394
  51. package/docs/classes/_internal_.X509Certificate.html +0 -144
  52. package/docs/classes/_internal_.internal-1.html +0 -256
  53. package/docs/classes/_internal_.internal.PassThrough.html +0 -686
  54. package/docs/classes/_internal_.internal.Transform.html +0 -693
  55. package/docs/enums/_internal_.logType.html +0 -4
  56. package/docs/functions/_internal_.WebSocket.createWebSocketStream.html +0 -1
  57. package/docs/functions/_internal_._node_stream_consumers_.arrayBuffer.html +0 -1
  58. package/docs/functions/_internal_._node_stream_consumers_.blob.html +0 -1
  59. package/docs/functions/_internal_._node_stream_consumers_.buffer.html +0 -1
  60. package/docs/functions/_internal_._node_stream_consumers_.json.html +0 -1
  61. package/docs/functions/_internal_._node_stream_consumers_.text.html +0 -1
  62. package/docs/functions/_internal_._node_stream_promises_.finished.html +0 -1
  63. package/docs/functions/_internal_._node_stream_promises_.pipeline.html +0 -1
  64. package/docs/functions/_internal_.internal.addAbortSignal.html +0 -17
  65. package/docs/functions/_internal_.internal.finished-1.html +0 -20
  66. package/docs/functions/_internal_.internal.finished.__promisify__.html +0 -1
  67. package/docs/functions/_internal_.internal.getDefaultHighWaterMark.html +0 -4
  68. package/docs/functions/_internal_.internal.isErrored.html +0 -3
  69. package/docs/functions/_internal_.internal.isReadable.html +0 -3
  70. package/docs/functions/_internal_.internal.pipeline-1.html +0 -24
  71. package/docs/functions/_internal_.internal.pipeline.__promisify__.html +0 -1
  72. package/docs/functions/_internal_.internal.setDefaultHighWaterMark.html +0 -4
  73. package/docs/hierarchy.html +0 -1
  74. package/docs/index.html +0 -12
  75. package/docs/interfaces/_internal_.AddToAgentStateResponse.html +0 -3
  76. package/docs/interfaces/_internal_.AddTokenResponse.html +0 -3
  77. package/docs/interfaces/_internal_.AddVectorItemResponse.html +0 -3
  78. package/docs/interfaces/_internal_.AddressInfo.html +0 -4
  79. package/docs/interfaces/_internal_.AgentOptions.html +0 -35
  80. package/docs/interfaces/_internal_.ApplicationState.html +0 -4
  81. package/docs/interfaces/_internal_.ArrayBufferView.html +0 -7
  82. package/docs/interfaces/_internal_.ArrayLike.html +0 -2
  83. package/docs/interfaces/_internal_.ArrayOptions.html +0 -7
  84. package/docs/interfaces/_internal_.AsymmetricKeyDetails.html +0 -15
  85. package/docs/interfaces/_internal_.AsyncGenerator.html +0 -5
  86. package/docs/interfaces/_internal_.AsyncGeneratorFunction.html +0 -12
  87. package/docs/interfaces/_internal_.AsyncIterable.html +0 -2
  88. package/docs/interfaces/_internal_.AsyncIterableIterator.html +0 -5
  89. package/docs/interfaces/_internal_.AsyncIterator.html +0 -4
  90. package/docs/interfaces/_internal_.AsyncResourceOptions.html +0 -12
  91. package/docs/interfaces/_internal_.BlobOptions.html +0 -8
  92. package/docs/interfaces/_internal_.Buffer.html +0 -760
  93. package/docs/interfaces/_internal_.BufferConstructor.html +0 -165
  94. package/docs/interfaces/_internal_.Certificate.html +0 -13
  95. package/docs/interfaces/_internal_.ChatMessage.html +0 -3
  96. package/docs/interfaces/_internal_.Choice.html +0 -5
  97. package/docs/interfaces/_internal_.CipherNameAndProtocol.html +0 -7
  98. package/docs/interfaces/_internal_.ClientRequestArgs.html +0 -28
  99. package/docs/interfaces/_internal_.CommandError.html +0 -3
  100. package/docs/interfaces/_internal_.CommonConnectionOptions.html +0 -29
  101. package/docs/interfaces/_internal_.ConnectOpts.html +0 -5
  102. package/docs/interfaces/_internal_.CreateFileResponse.html +0 -6
  103. package/docs/interfaces/_internal_.CreateFolderResponse.html +0 -6
  104. package/docs/interfaces/_internal_.CryptoKey.html +0 -26
  105. package/docs/interfaces/_internal_.DebugAddLogResponse.html +0 -4
  106. package/docs/interfaces/_internal_.DeleteFileResponse.html +0 -6
  107. package/docs/interfaces/_internal_.DeleteFolderResponse.html +0 -6
  108. package/docs/interfaces/_internal_.DetailedPeerCertificate.html +0 -53
  109. package/docs/interfaces/_internal_.Dict.html +0 -1
  110. package/docs/interfaces/_internal_.Disposable.html +0 -2
  111. package/docs/interfaces/_internal_.DropArgument.html +0 -7
  112. package/docs/interfaces/_internal_.DuplexOptions.html +0 -22
  113. package/docs/interfaces/_internal_.EphemeralKeyInfo.html +0 -7
  114. package/docs/interfaces/_internal_.ErrnoException.html +0 -8
  115. package/docs/interfaces/_internal_.Error.html +0 -4
  116. package/docs/interfaces/_internal_.EventEmitter-2.html +0 -130
  117. package/docs/interfaces/_internal_.EventEmitter.Abortable.html +0 -3
  118. package/docs/interfaces/_internal_.EventEmitter.EventEmitterAsyncResourceOptions.html +0 -19
  119. package/docs/interfaces/_internal_.EventEmitter.EventEmitterReferencingAsyncResource.html +0 -32
  120. package/docs/interfaces/_internal_.EventEmitterOptions.html +0 -3
  121. package/docs/interfaces/_internal_.ExtractTextResponse.html +0 -3
  122. package/docs/interfaces/_internal_.GetAgentStateResponse.html +0 -3
  123. package/docs/interfaces/_internal_.GetContentResponse.html +0 -3
  124. package/docs/interfaces/_internal_.GetMarkdownResponse.html +0 -3
  125. package/docs/interfaces/_internal_.GetMatcherListTreeResponse.html +0 -3
  126. package/docs/interfaces/_internal_.GetProjectPathResponse.html +0 -5
  127. package/docs/interfaces/_internal_.GetTokenResponse.html +0 -3
  128. package/docs/interfaces/_internal_.GetVectorResponse.html +0 -3
  129. package/docs/interfaces/_internal_.GoToPageResponse.html +0 -3
  130. package/docs/interfaces/_internal_.HtmlReceived.html +0 -3
  131. package/docs/interfaces/_internal_.IncomingHttpHeaders.html +0 -64
  132. package/docs/interfaces/_internal_.InformationEvent.html +0 -8
  133. package/docs/interfaces/_internal_.IpcSocketConnectOpts.html +0 -6
  134. package/docs/interfaces/_internal_.Iterable.html +0 -2
  135. package/docs/interfaces/_internal_.IterableIterator.html +0 -5
  136. package/docs/interfaces/_internal_.Iterator.html +0 -4
  137. package/docs/interfaces/_internal_.IteratorReturnResult.html +0 -3
  138. package/docs/interfaces/_internal_.IteratorYieldResult.html +0 -3
  139. package/docs/interfaces/_internal_.JsonWebKey.html +0 -14
  140. package/docs/interfaces/_internal_.JwkKeyExportOptions.html +0 -2
  141. package/docs/interfaces/_internal_.KeyAlgorithm.html +0 -2
  142. package/docs/interfaces/_internal_.KeyExportOptions.html +0 -5
  143. package/docs/interfaces/_internal_.KeyObject-1.html +0 -5
  144. package/docs/interfaces/_internal_.LLMResponse.html +0 -4
  145. package/docs/interfaces/_internal_.ListenOptions.html +0 -13
  146. package/docs/interfaces/_internal_.LookupAddress.html +0 -6
  147. package/docs/interfaces/_internal_.LookupOptions.html +0 -27
  148. package/docs/interfaces/_internal_.MatchProblemResponse.html +0 -3
  149. package/docs/interfaces/_internal_.MemoryGetResponse.html +0 -5
  150. package/docs/interfaces/_internal_.MemorySetResponse.html +0 -5
  151. package/docs/interfaces/_internal_.Message.html +0 -8
  152. package/docs/interfaces/_internal_.MessageContent.html +0 -3
  153. package/docs/interfaces/_internal_.Object.html +0 -18
  154. package/docs/interfaces/_internal_.OnReadOpts.html +0 -6
  155. package/docs/interfaces/_internal_.OpenDebugBrowserResponse.html +0 -4
  156. package/docs/interfaces/_internal_.OutgoingHttpHeaders.html +0 -80
  157. package/docs/interfaces/_internal_.PeerCertificate.html +0 -50
  158. package/docs/interfaces/_internal_.PromiseLike.html +0 -6
  159. package/docs/interfaces/_internal_.PxfObject.html +0 -5
  160. package/docs/interfaces/_internal_.QueryVectorItemResponse.html +0 -3
  161. package/docs/interfaces/_internal_.QueuingStrategy.html +0 -3
  162. package/docs/interfaces/_internal_.QueuingStrategySize.html +0 -1
  163. package/docs/interfaces/_internal_.ReadFileResponse.html +0 -7
  164. package/docs/interfaces/_internal_.ReadOnlyDict.html +0 -1
  165. package/docs/interfaces/_internal_.ReadWriteStream.html +0 -144
  166. package/docs/interfaces/_internal_.ReadableByteStreamController.html +0 -6
  167. package/docs/interfaces/_internal_.ReadableByteStreamControllerCallback.html +0 -1
  168. package/docs/interfaces/_internal_.ReadableOptions.html +0 -11
  169. package/docs/interfaces/_internal_.ReadableStream-1.html +0 -141
  170. package/docs/interfaces/_internal_.ReadableStream.html +0 -10
  171. package/docs/interfaces/_internal_.ReadableStreamBYOBReader.html +0 -5
  172. package/docs/interfaces/_internal_.ReadableStreamDefaultController.html +0 -5
  173. package/docs/interfaces/_internal_.ReadableStreamDefaultReadDoneResult.html +0 -3
  174. package/docs/interfaces/_internal_.ReadableStreamDefaultReadValueResult.html +0 -3
  175. package/docs/interfaces/_internal_.ReadableStreamDefaultReader.html +0 -5
  176. package/docs/interfaces/_internal_.ReadableStreamErrorCallback.html +0 -1
  177. package/docs/interfaces/_internal_.ReadableStreamGenericReader.html +0 -3
  178. package/docs/interfaces/_internal_.ReadableStreamReadDoneResult.html +0 -3
  179. package/docs/interfaces/_internal_.ReadableStreamReadValueResult.html +0 -3
  180. package/docs/interfaces/_internal_.ReadableWritablePair.html +0 -9
  181. package/docs/interfaces/_internal_.SecureContext.html +0 -2
  182. package/docs/interfaces/_internal_.SecureContextOptions.html +0 -121
  183. package/docs/interfaces/_internal_.Selection.html +0 -6
  184. package/docs/interfaces/_internal_.ServerOptions.html +0 -64
  185. package/docs/interfaces/_internal_.ServerOpts.html +0 -25
  186. package/docs/interfaces/_internal_.SharedArrayBuffer.html +0 -7
  187. package/docs/interfaces/_internal_.SharedArrayBufferConstructor.html +0 -3
  188. package/docs/interfaces/_internal_.SocketConstructorOpts.html +0 -6
  189. package/docs/interfaces/_internal_.StaticEventEmitterOptions.html +0 -15
  190. package/docs/interfaces/_internal_.StreamOptions.html +0 -9
  191. package/docs/interfaces/_internal_.StreamPipeOptions.html +0 -37
  192. package/docs/interfaces/_internal_.TLSSocketOptions.html +0 -160
  193. package/docs/interfaces/_internal_.TcpSocketConnectOpts.html +0 -19
  194. package/docs/interfaces/_internal_.TerminalInterruptResponse.html +0 -3
  195. package/docs/interfaces/_internal_.TlsOptions.html +0 -197
  196. package/docs/interfaces/_internal_.UnderlyingByteSource.html +0 -6
  197. package/docs/interfaces/_internal_.UnderlyingSink.html +0 -6
  198. package/docs/interfaces/_internal_.UnderlyingSinkAbortCallback.html +0 -1
  199. package/docs/interfaces/_internal_.UnderlyingSinkCloseCallback.html +0 -1
  200. package/docs/interfaces/_internal_.UnderlyingSinkStartCallback.html +0 -1
  201. package/docs/interfaces/_internal_.UnderlyingSinkWriteCallback.html +0 -1
  202. package/docs/interfaces/_internal_.UnderlyingSource.html +0 -5
  203. package/docs/interfaces/_internal_.UnderlyingSourceCancelCallback.html +0 -1
  204. package/docs/interfaces/_internal_.UnderlyingSourcePullCallback.html +0 -1
  205. package/docs/interfaces/_internal_.UnderlyingSourceStartCallback.html +0 -1
  206. package/docs/interfaces/_internal_.UpdateFileResponse.html +0 -6
  207. package/docs/interfaces/_internal_.UrlResponse.html +0 -3
  208. package/docs/interfaces/_internal_.Usage-1.html +0 -4
  209. package/docs/interfaces/_internal_.Usage.html +0 -4
  210. package/docs/interfaces/_internal_.UserMessage.html +0 -3
  211. package/docs/interfaces/_internal_.UserRequest.html +0 -7
  212. package/docs/interfaces/_internal_.WebSocket.AddressInfo.html +0 -4
  213. package/docs/interfaces/_internal_.WebSocket.ClientOptions.html +0 -138
  214. package/docs/interfaces/_internal_.WebSocket.CloseEvent.html +0 -6
  215. package/docs/interfaces/_internal_.WebSocket.ErrorEvent.html +0 -5
  216. package/docs/interfaces/_internal_.WebSocket.Event.html +0 -3
  217. package/docs/interfaces/_internal_.WebSocket.EventListenerOptions.html +0 -2
  218. package/docs/interfaces/_internal_.WebSocket.MessageEvent.html +0 -4
  219. package/docs/interfaces/_internal_.WebSocket.PerMessageDeflateOptions.html +0 -9
  220. package/docs/interfaces/_internal_.WebSocket.ServerOptions.html +0 -14
  221. package/docs/interfaces/_internal_.WebSocket.WebSocket.html +0 -172
  222. package/docs/interfaces/_internal_.WebSocket.WebSocketServer.html +0 -144
  223. package/docs/interfaces/_internal_.WebSocketAlias.html +0 -172
  224. package/docs/interfaces/_internal_.WritableOptions.html +0 -14
  225. package/docs/interfaces/_internal_.WritableStream-1.html +0 -8
  226. package/docs/interfaces/_internal_.WritableStream.html +0 -133
  227. package/docs/interfaces/_internal_.WritableStreamDefaultController.html +0 -6
  228. package/docs/interfaces/_internal_.WritableStreamDefaultWriter.html +0 -12
  229. package/docs/interfaces/_internal_.X509CheckOptions.html +0 -16
  230. package/docs/interfaces/_internal_.ZlibOptions.html +0 -21
  231. package/docs/interfaces/_internal_.getMatchDetail.html +0 -3
  232. package/docs/interfaces/_internal_.internal.FinishedOptions.html +0 -6
  233. package/docs/interfaces/_internal_.internal.Pipe.html +0 -5
  234. package/docs/interfaces/_internal_.internal.PipelineOptions.html +0 -3
  235. package/docs/interfaces/_internal_.internal.TransformOptions.html +0 -24
  236. package/docs/modules/_internal_.EventEmitter.html +0 -6
  237. package/docs/modules/_internal_.WebSocket.html +0 -21
  238. package/docs/modules/_internal_._node_stream_consumers_.html +0 -6
  239. package/docs/modules/_internal_._node_stream_promises_.html +0 -3
  240. package/docs/modules/_internal_.html +0 -228
  241. package/docs/modules/_internal_.internal.finished.html +0 -2
  242. package/docs/modules/_internal_.internal.html +0 -36
  243. package/docs/modules/_internal_.internal.pipeline.html +0 -2
  244. package/docs/modules.html +0 -3
  245. package/docs/types/_internal_.AnyRest.html +0 -1
  246. package/docs/types/_internal_.Args.html +0 -1
  247. package/docs/types/_internal_.ArrayBufferLike.html +0 -1
  248. package/docs/types/_internal_.ArrayBufferView-1.html +0 -1
  249. package/docs/types/_internal_.BinaryLike.html +0 -1
  250. package/docs/types/_internal_.BufferEncoding.html +0 -1
  251. package/docs/types/_internal_.BufferLike.html +0 -1
  252. package/docs/types/_internal_.ComposeFnParam.html +0 -1
  253. package/docs/types/_internal_.DefaultEventMap.html +0 -1
  254. package/docs/types/_internal_.EventMap.html +0 -1
  255. package/docs/types/_internal_.InstanceType.html +0 -2
  256. package/docs/types/_internal_.IteratorResult.html +0 -1
  257. package/docs/types/_internal_.Key.html +0 -1
  258. package/docs/types/_internal_.Key2.html +0 -1
  259. package/docs/types/_internal_.KeyFormat.html +0 -1
  260. package/docs/types/_internal_.KeyObjectType.html +0 -1
  261. package/docs/types/_internal_.KeyType-1.html +0 -1
  262. package/docs/types/_internal_.KeyType.html +0 -1
  263. package/docs/types/_internal_.KeyUsage.html +0 -1
  264. package/docs/types/_internal_.Listener.html +0 -1
  265. package/docs/types/_internal_.LookupFunction.html +0 -1
  266. package/docs/types/_internal_.OutgoingHttpHeader.html +0 -1
  267. package/docs/types/_internal_.Partial.html +0 -2
  268. package/docs/types/_internal_.Pick.html +0 -2
  269. package/docs/types/_internal_.PropertyKey.html +0 -1
  270. package/docs/types/_internal_.ReadableStreamController.html +0 -1
  271. package/docs/types/_internal_.ReadableStreamDefaultReadResult.html +0 -1
  272. package/docs/types/_internal_.ReadableStreamReadResult.html +0 -1
  273. package/docs/types/_internal_.Record.html +0 -2
  274. package/docs/types/_internal_.RequestListener.html +0 -1
  275. package/docs/types/_internal_.SecureVersion.html +0 -1
  276. package/docs/types/_internal_.ServerOptions-1.html +0 -1
  277. package/docs/types/_internal_.SocketConnectOpts.html +0 -1
  278. package/docs/types/_internal_.SocketReadyState.html +0 -1
  279. package/docs/types/_internal_.TypedArray.html +0 -1
  280. package/docs/types/_internal_.WebSocket.CertMeta.html +0 -2
  281. package/docs/types/_internal_.WebSocket.Data.html +0 -2
  282. package/docs/types/_internal_.WebSocket.RawData.html +0 -2
  283. package/docs/types/_internal_.WebSocket.VerifyClientCallbackAsync.html +0 -4
  284. package/docs/types/_internal_.WebSocket.VerifyClientCallbackSync.html +0 -4
  285. package/docs/types/_internal_.WithImplicitCoercion.html +0 -1
  286. package/docs/types/_internal_.internal.PipelineCallback.html +0 -1
  287. package/docs/types/_internal_.internal.PipelineDestination.html +0 -1
  288. package/docs/types/_internal_.internal.PipelineDestinationIterableFunction.html +0 -1
  289. package/docs/types/_internal_.internal.PipelineDestinationPromiseFunction.html +0 -1
  290. package/docs/types/_internal_.internal.PipelinePromise.html +0 -1
  291. package/docs/types/_internal_.internal.PipelineSource.html +0 -1
  292. package/docs/types/_internal_.internal.PipelineSourceFunction.html +0 -1
  293. package/docs/types/_internal_.internal.PipelineTransform.html +0 -1
  294. package/docs/types/_internal_.internal.PipelineTransformSource.html +0 -1
  295. package/docs/types/_internal_.internal.TransformCallback.html +0 -1
  296. package/docs/variables/_internal_.Buffer-1.html +0 -1
  297. package/docs/variables/_internal_.Error-1.html +0 -1
  298. package/docs/variables/_internal_.Object-1.html +0 -2
  299. package/docs/variables/_internal_.ReadableByteStreamController-1.html +0 -1
  300. package/docs/variables/_internal_.ReadableStream-2.html +0 -1
  301. package/docs/variables/_internal_.ReadableStreamBYOBReader-1.html +0 -1
  302. package/docs/variables/_internal_.ReadableStreamDefaultController-1.html +0 -1
  303. package/docs/variables/_internal_.ReadableStreamDefaultReader-1.html +0 -1
  304. package/docs/variables/_internal_.SharedArrayBuffer-1.html +0 -1
  305. package/docs/variables/_internal_.WebSocket.WebSocket-1.html +0 -1
  306. package/docs/variables/_internal_.WebSocket.WebSocketServer-1.html +0 -1
  307. package/docs/variables/_internal_.WebSocketAlias-1.html +0 -1
  308. package/docs/variables/_internal_.WritableStream-2.html +0 -1
  309. package/docs/variables/_internal_.WritableStreamDefaultController-1.html +0 -1
  310. package/docs/variables/_internal_.WritableStreamDefaultWriter-1.html +0 -1
  311. package/docs/variables/_internal_.internal.consumers.html +0 -1
  312. package/docs/variables/_internal_.internal.promises.html +0 -1
  313. package/docs/variables/default.html +0 -1
  314. package/script/gen.js +0 -27
  315. package/src/index.ts +0 -108
  316. package/src/modules/agent.ts +0 -120
  317. package/src/modules/agentlib/agent.ts +0 -417
  318. package/src/modules/agentlib/systemprompt.ts +0 -55
  319. package/src/modules/agentlib/taskInstruction.ts +0 -105
  320. package/src/modules/agentlib/usermessage.ts +0 -188
  321. package/src/modules/browser.ts +0 -352
  322. package/src/modules/chat.ts +0 -229
  323. package/src/modules/codeparsers.ts +0 -28
  324. package/src/modules/codeutils.ts +0 -182
  325. package/src/modules/crawler.ts +0 -121
  326. package/src/modules/dbmemory.ts +0 -52
  327. package/src/modules/debug.ts +0 -68
  328. package/src/modules/docutils.ts +0 -18
  329. package/src/modules/fs.ts +0 -263
  330. package/src/modules/git.ts +0 -237
  331. package/src/modules/history.ts +0 -82
  332. package/src/modules/knowledge.ts +0 -5
  333. package/src/modules/llm.ts +0 -36
  334. package/src/modules/outputparsers.ts +0 -30
  335. package/src/modules/project.ts +0 -68
  336. package/src/modules/rag.ts +0 -27
  337. package/src/modules/search.ts +0 -32
  338. package/src/modules/state.ts +0 -115
  339. package/src/modules/task.ts +0 -73
  340. package/src/modules/terminal.ts +0 -113
  341. package/src/modules/tokenizer.ts +0 -56
  342. package/src/modules/toolBox.ts +0 -1384
  343. package/src/modules/tools.ts +0 -254
  344. package/src/modules/vectordb.ts +0 -102
  345. package/src/modules/websocket.ts +0 -97
  346. package/src/utils/editFile.ts +0 -30
  347. package/src/utils.ts +0 -5
  348. package/tests/chat.test.js +0 -0
  349. package/tests/fs.test.js +0 -89
  350. package/tests/index.test.js +0 -4
  351. package/tsconfig.json +0 -122
  352. package/utils.d.ts +0 -5
  353. package/webpack.config.js +0 -25
  354. /package/{modules → dist}/agentlib/agent.d.ts +0 -0
  355. /package/{modules → dist}/agentlib/systemprompt.d.ts +0 -0
  356. /package/{modules → dist}/agentlib/systemprompt.js +0 -0
  357. /package/{modules → dist}/agentlib/taskInstruction.d.ts +0 -0
  358. /package/{modules → dist}/agentlib/taskInstruction.js +0 -0
  359. /package/{modules → dist}/agentlib/usermessage.d.ts +0 -0
  360. /package/{index.d.ts → dist/index.d.ts} +0 -0
  361. /package/{index.js → dist/index.js} +0 -0
  362. /package/{modules → dist/modules}/agent.d.ts +0 -0
  363. /package/{modules → dist/modules}/agent.js +0 -0
  364. /package/{modules → dist/modules}/browser.d.ts +0 -0
  365. /package/{modules → dist/modules}/browser.js +0 -0
  366. /package/{modules → dist/modules}/chat.d.ts +0 -0
  367. /package/{modules → dist/modules}/chat.js +0 -0
  368. /package/{modules → dist/modules}/codeparsers.d.ts +0 -0
  369. /package/{modules → dist/modules}/codeparsers.js +0 -0
  370. /package/{modules → dist/modules}/codeutils.d.ts +0 -0
  371. /package/{modules → dist/modules}/codeutils.js +0 -0
  372. /package/{modules → dist/modules}/crawler.d.ts +0 -0
  373. /package/{modules → dist/modules}/crawler.js +0 -0
  374. /package/{modules → dist/modules}/dbmemory.d.ts +0 -0
  375. /package/{modules → dist/modules}/dbmemory.js +0 -0
  376. /package/{modules → dist/modules}/debug.d.ts +0 -0
  377. /package/{modules → dist/modules}/debug.js +0 -0
  378. /package/{modules → dist/modules}/docutils.d.ts +0 -0
  379. /package/{modules → dist/modules}/docutils.js +0 -0
  380. /package/{modules → dist/modules}/fs.d.ts +0 -0
  381. /package/{modules → dist/modules}/fs.js +0 -0
  382. /package/{modules → dist/modules}/git.d.ts +0 -0
  383. /package/{modules → dist/modules}/git.js +0 -0
  384. /package/{modules → dist/modules}/history.d.ts +0 -0
  385. /package/{modules → dist/modules}/history.js +0 -0
  386. /package/{modules → dist/modules}/knowledge.d.ts +0 -0
  387. /package/{modules → dist/modules}/knowledge.js +0 -0
  388. /package/{modules → dist/modules}/llm.d.ts +0 -0
  389. /package/{modules → dist/modules}/llm.js +0 -0
  390. /package/{modules → dist/modules}/outputparsers.d.ts +0 -0
  391. /package/{modules → dist/modules}/outputparsers.js +0 -0
  392. /package/{modules → dist/modules}/project.d.ts +0 -0
  393. /package/{modules → dist/modules}/project.js +0 -0
  394. /package/{modules → dist/modules}/rag.d.ts +0 -0
  395. /package/{modules → dist/modules}/rag.js +0 -0
  396. /package/{modules → dist/modules}/search.d.ts +0 -0
  397. /package/{modules → dist/modules}/search.js +0 -0
  398. /package/{modules → dist/modules}/state.d.ts +0 -0
  399. /package/{modules → dist/modules}/state.js +0 -0
  400. /package/{modules → dist/modules}/task.d.ts +0 -0
  401. /package/{modules → dist/modules}/task.js +0 -0
  402. /package/{modules → dist/modules}/terminal.d.ts +0 -0
  403. /package/{modules → dist/modules}/terminal.js +0 -0
  404. /package/{modules → dist/modules}/tokenizer.d.ts +0 -0
  405. /package/{modules → dist/modules}/tokenizer.js +0 -0
  406. /package/{modules → dist/modules}/toolBox.d.ts +0 -0
  407. /package/{modules → dist/modules}/toolBox.js +0 -0
  408. /package/{modules → dist/modules}/tools.d.ts +0 -0
  409. /package/{modules → dist/modules}/tools.js +0 -0
  410. /package/{modules → dist/modules}/vectordb.d.ts +0 -0
  411. /package/{modules → dist/modules}/vectordb.js +0 -0
  412. /package/{modules → dist/modules}/websocket.d.ts +0 -0
  413. /package/{modules → dist/modules}/websocket.js +0 -0
  414. /package/{utils → dist/utils}/editFile.d.ts +0 -0
  415. /package/{utils → dist/utils}/editFile.js +0 -0
@@ -1,353 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Server | @codebolt/codeboltjs</title><meta name="description" content="Documentation for @codebolt/codeboltjs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@codebolt/codeboltjs</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@codebolt/codeboltjs</a></li><li><a href="../modules/_internal_.html">&lt;internal&gt;</a></li><li><a href="_internal_.Server-3.html">Server</a></li></ul><h1>Class Server</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Accepts encrypted connections using TLS or SSL.</p>
2
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.3.2</p>
3
- </div></section><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a class="link" href="../hierarchy.html#<internal>.Server">view full</a>)</h4><ul class="tsd-hierarchy"><li><a href="_internal_.Server-2.html" class="tsd-signature-type tsd-kind-class">Server</a><ul class="tsd-hierarchy"><li><span class="target">Server</span><ul class="tsd-hierarchy"><li><a href="_internal_.Server-1.html" class="tsd-signature-type tsd-kind-class">Server</a></li></ul></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:628</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="_internal_.Server-3.html#constructor" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
4
- </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="_internal_.Server-3.html#connections" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>connections</span></a>
5
- <a href="_internal_.Server-3.html#listening" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>listening</span></a>
6
- <a href="_internal_.Server-3.html#maxConnections" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Connections</span></a>
7
- <a href="_internal_.Server-3.html#captureRejectionSymbol" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>capture<wbr/>Rejection<wbr/>Symbol</span></a>
8
- <a href="_internal_.Server-3.html#captureRejections" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>capture<wbr/>Rejections</span></a>
9
- <a href="_internal_.Server-3.html#defaultMaxListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>default<wbr/>Max<wbr/>Listeners</span></a>
10
- <a href="_internal_.Server-3.html#errorMonitor" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>error<wbr/>Monitor</span></a>
11
- </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="_internal_.Server-3.html#_asyncDispose_" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[async<wbr/>Dispose]</span></a>
12
- <a href="_internal_.Server-3.html#_captureRejectionSymbol_" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[capture<wbr/>Rejection<wbr/>Symbol]?</span></a>
13
- <a href="_internal_.Server-3.html#addContext" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Context</span></a>
14
- <a href="_internal_.Server-3.html#addListener" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Listener</span></a>
15
- <a href="_internal_.Server-3.html#address" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>address</span></a>
16
- <a href="_internal_.Server-3.html#close" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>close</span></a>
17
- <a href="_internal_.Server-3.html#emit" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>emit</span></a>
18
- <a href="_internal_.Server-3.html#eventNames" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>event<wbr/>Names</span></a>
19
- <a href="_internal_.Server-3.html#getConnections" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Connections</span></a>
20
- <a href="_internal_.Server-3.html#getMaxListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Max<wbr/>Listeners</span></a>
21
- <a href="_internal_.Server-3.html#getTicketKeys" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Ticket<wbr/>Keys</span></a>
22
- <a href="_internal_.Server-3.html#listen" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listen</span></a>
23
- <a href="_internal_.Server-3.html#listenerCount" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listener<wbr/>Count</span></a>
24
- <a href="_internal_.Server-3.html#listeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listeners</span></a>
25
- <a href="_internal_.Server-3.html#off" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>off</span></a>
26
- <a href="_internal_.Server-3.html#on" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>on</span></a>
27
- <a href="_internal_.Server-3.html#once" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>once</span></a>
28
- <a href="_internal_.Server-3.html#prependListener" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepend<wbr/>Listener</span></a>
29
- <a href="_internal_.Server-3.html#prependOnceListener" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepend<wbr/>Once<wbr/>Listener</span></a>
30
- <a href="_internal_.Server-3.html#rawListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>raw<wbr/>Listeners</span></a>
31
- <a href="_internal_.Server-3.html#ref" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ref</span></a>
32
- <a href="_internal_.Server-3.html#removeAllListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>All<wbr/>Listeners</span></a>
33
- <a href="_internal_.Server-3.html#removeListener" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Listener</span></a>
34
- <a href="_internal_.Server-3.html#setMaxListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Max<wbr/>Listeners</span></a>
35
- <a href="_internal_.Server-3.html#setSecureContext" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Secure<wbr/>Context</span></a>
36
- <a href="_internal_.Server-3.html#setTicketKeys" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Ticket<wbr/>Keys</span></a>
37
- <a href="_internal_.Server-3.html#unref" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>unref</span></a>
38
- <a href="_internal_.Server-3.html#addAbortListener" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Abort<wbr/>Listener</span></a>
39
- <a href="_internal_.Server-3.html#getEventListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Event<wbr/>Listeners</span></a>
40
- <a href="_internal_.Server-3.html#getMaxListeners-2" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Max<wbr/>Listeners</span></a>
41
- <a href="_internal_.Server-3.html#listenerCount-2" class="tsd-index-link deprecated tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listener<wbr/>Count</span></a>
42
- <a href="_internal_.Server-3.html#on-8" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>on</span></a>
43
- <a href="_internal_.Server-3.html#once-8" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>once</span></a>
44
- <a href="_internal_.Server-3.html#setMaxListeners-2" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Max<wbr/>Listeners</span></a>
45
- </div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-is-external"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_Server" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Server</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">secureConnectionListener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Server-3.html" class="tsd-signature-type tsd-kind-class">Server</a><a href="#constructor.new_Server" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">secureConnectionListener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">socket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">socket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">socket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Server-3.html" class="tsd-signature-type tsd-kind-class">Server</a></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#constructor">constructor</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:629</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_Server-1" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Server</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span>, <span class="tsd-kind-parameter">secureConnectionListener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Server-3.html" class="tsd-signature-type tsd-kind-class">Server</a><a href="#constructor.new_Server-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.TlsOptions.html" class="tsd-signature-type tsd-kind-interface">TlsOptions</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">secureConnectionListener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">socket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">socket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">socket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Server-3.html" class="tsd-signature-type tsd-kind-class">Server</a></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#constructor">constructor</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:630</li></ul></aside></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="connections" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>connections</span><a href="#connections" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">connections</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#connections">connections</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:668</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="listening" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>listening</span><a href="#listening" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">listening</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Indicates whether or not the server is listening for connections.</p>
46
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v5.7.0</p>
47
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listening">listening</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:673</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="maxConnections" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>max<wbr/>Connections</span><a href="#maxConnections" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">max<wbr/>Connections</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Set this property to reject connections when the server&#39;s connection count gets
48
- high.</p>
49
- <p>It is not recommended to use this option once a socket has been sent to a child
50
- with <code>child_process.fork()</code>.</p>
51
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.2.0</p>
52
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#maxConnections">maxConnections</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:667</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="captureRejectionSymbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>capture<wbr/>Rejection<wbr/>Symbol</span><a href="#captureRejectionSymbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">capture<wbr/>Rejection<wbr/>Symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof </span><a href="_internal_.EventEmitter-1.html#captureRejectionSymbol" class="tsd-signature-type tsd-kind-property">captureRejectionSymbol</a></div><div class="tsd-comment tsd-typography"><p>Value: <code>Symbol.for(&#39;nodejs.rejection&#39;)</code></p>
53
- <p>See how to write a custom <code>rejection handler</code>.</p>
54
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.4.0, v12.16.0</p>
55
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#captureRejectionSymbol">captureRejectionSymbol</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:430</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="captureRejections" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>capture<wbr/>Rejections</span><a href="#captureRejections" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">capture<wbr/>Rejections</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Value: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type">boolean</a></p>
56
- <p>Change the default <code>captureRejections</code> option on all new <code>EventEmitter</code> objects.</p>
57
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.4.0, v12.16.0</p>
58
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#captureRejections">captureRejections</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:437</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="defaultMaxListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>default<wbr/>Max<wbr/>Listeners</span><a href="#defaultMaxListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">default<wbr/>Max<wbr/>Listeners</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>By default, a maximum of <code>10</code> listeners can be registered for any single
59
- event. This limit can be changed for individual <code>EventEmitter</code> instances
60
- using the <code>emitter.setMaxListeners(n)</code> method. To change the default
61
- for <em>all</em><code>EventEmitter</code> instances, the <code>events.defaultMaxListeners</code> property
62
- can be used. If this value is not a positive number, a <code>RangeError</code> is thrown.</p>
63
- <p>Take caution when setting the <code>events.defaultMaxListeners</code> because the
64
- change affects <em>all</em> <code>EventEmitter</code> instances, including those created before
65
- the change is made. However, calling <code>emitter.setMaxListeners(n)</code> still has
66
- precedence over <code>events.defaultMaxListeners</code>.</p>
67
- <p>This is not a hard limit. The <code>EventEmitter</code> instance will allow
68
- more listeners to be added but will output a trace warning to stderr indicating
69
- that a &quot;possible EventEmitter memory leak&quot; has been detected. For any single
70
- <code>EventEmitter</code>, the <code>emitter.getMaxListeners()</code> and <code>emitter.setMaxListeners()</code> methods can be used to
71
- temporarily avoid this warning:</p>
72
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">emitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">setMaxListeners</span><span class="hl-1">(</span><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">getMaxListeners</span><span class="hl-1">() + </span><span class="hl-9">1</span><span class="hl-1">);</span><br/><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">// do stuff</span><br/><span class="hl-1"> </span><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">setMaxListeners</span><span class="hl-1">(</span><span class="hl-7">Math</span><span class="hl-1">.</span><span class="hl-0">max</span><span class="hl-1">(</span><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">getMaxListeners</span><span class="hl-1">() - </span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-1">});</span>
73
- </code><button>Copy</button></pre>
74
- <p>The <code>--trace-warnings</code> command-line flag can be used to display the
75
- stack trace for such warnings.</p>
76
- <p>The emitted warning can be inspected with <code>process.on(&#39;warning&#39;)</code> and will
77
- have the additional <code>emitter</code>, <code>type</code>, and <code>count</code> properties, referring to
78
- the event emitter instance, the event&#39;s name and the number of attached
79
- listeners, respectively.
80
- Its <code>name</code> property is set to <code>&#39;MaxListenersExceededWarning&#39;</code>.</p>
81
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.2</p>
82
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#defaultMaxListeners">defaultMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:476</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="errorMonitor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>error<wbr/>Monitor</span><a href="#errorMonitor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">error<wbr/>Monitor</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof </span><a href="_internal_.EventEmitter-1.html#errorMonitor" class="tsd-signature-type tsd-kind-property">errorMonitor</a></div><div class="tsd-comment tsd-typography"><p>This symbol shall be used to install a listener for only monitoring <code>&#39;error&#39;</code> events. Listeners installed using this symbol are called before the regular <code>&#39;error&#39;</code> listeners are called.</p>
83
- <p>Installing a listener using this symbol does not change the behavior once an <code>&#39;error&#39;</code> event is emitted. Therefore, the process will still crash if no
84
- regular <code>&#39;error&#39;</code> listener is installed.</p>
85
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.6.0, v12.17.0</p>
86
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#errorMonitor">errorMonitor</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:423</li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_asyncDispose_" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[async<wbr/>Dispose]</span><a href="#_asyncDispose_" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="_asyncDispose_._asyncDispose_-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">[async<wbr/>Dispose]</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#_asyncDispose_._asyncDispose_-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Calls <a href="_internal_.Server-2.html#close" class="tsd-kind-method">()</a> and returns a promise that fulfills when the server has closed.</p>
87
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v20.5.0</p>
88
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#_asyncDispose_">[asyncDispose]</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:722</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_captureRejectionSymbol_" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>[capture<wbr/>Rejection<wbr/>Symbol]</span><a href="#_captureRejectionSymbol_" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="_captureRejectionSymbol_._captureRejectionSymbol_-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">[capture<wbr/>Rejection<wbr/>Symbol]</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Server-3.html#_captureRejectionSymbol_._captureRejectionSymbol_-1.K">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span>, <span class="tsd-kind-parameter">event</span>, <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_captureRejectionSymbol_._captureRejectionSymbol_-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="_captureRejectionSymbol_._captureRejectionSymbol_-1.K" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <a href="../types/_internal_.AnyRest.html" class="tsd-signature-type tsd-kind-type-alias">AnyRest</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#_captureRejectionSymbol_">[captureRejectionSymbol]</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:135</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="addContext" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>add<wbr/>Context</span><a href="#addContext" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="addContext.addContext-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Context</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">hostname</span>, <span class="tsd-kind-parameter">context</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#addContext.addContext-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The <code>server.addContext()</code> method adds a secure context that will be used if
89
- the client request&#39;s SNI name matches the supplied <code>hostname</code> (or wildcard).</p>
90
- <p>When there are multiple matching contexts, the most recently added one is
91
- used.</p>
92
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">hostname</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A SNI host name or wildcard (e.g. <code>&#39;*&#39;</code>)</p>
93
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">context</span>: <a href="../interfaces/_internal_.SecureContextOptions.html" class="tsd-signature-type tsd-kind-interface">SecureContextOptions</a></span><div class="tsd-comment tsd-typography"><p>An object containing any of the possible properties from the createSecureContext <code>options</code> arguments (e.g. <code>key</code>, <code>cert</code>, <code>ca</code>, etc), or a TLS context object created
94
- with createSecureContext itself.</p>
95
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.3</p>
96
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:642</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="addListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>add<wbr/>Listener</span><a href="#addListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>events.EventEmitter</p>
97
- <ol>
98
- <li>tlsClientError</li>
99
- <li>newSession</li>
100
- <li>OCSPRequest</li>
101
- <li>resumeSession</li>
102
- <li>secureConnection</li>
103
- <li>keylog</li>
104
- </ol>
105
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:678</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;tlsClientError&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:679</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;newSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">sessionData</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">sessionData</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:680</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;OCSPRequest&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">certificate</span>, <span class="tsd-kind-parameter">issuer</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">certificate</span>, <span class="tsd-kind-parameter">issuer</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">certificate</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">issuer</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">resp</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:684</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;resumeSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:692</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;secureConnection&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:696</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;keylog&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">line</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides net.Server.addListener</p><ul><li>Defined in node_modules/@types/node/tls.d.ts:697</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="address" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>address</span><a href="#address" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="address.address-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">address</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.AddressInfo.html" class="tsd-signature-type tsd-kind-interface">AddressInfo</a><a href="#address.address-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the bound <code>address</code>, the address <code>family</code> name, and <code>port</code> of the server
106
- as reported by the operating system if listening on an IP socket
107
- (useful to find which port was assigned when getting an OS-assigned address):<code>{ port: 12346, family: &#39;IPv4&#39;, address: &#39;127.0.0.1&#39; }</code>.</p>
108
- <p>For a server listening on a pipe or Unix domain socket, the name is returned
109
- as a string.</p>
110
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">server</span><span class="hl-1"> = </span><span class="hl-7">net</span><span class="hl-1">.</span><span class="hl-0">createServer</span><span class="hl-1">((</span><span class="hl-7">socket</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">socket</span><span class="hl-1">.</span><span class="hl-0">end</span><span class="hl-1">(</span><span class="hl-2">&#39;goodbye</span><span class="hl-11">\n</span><span class="hl-2">&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">}).</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">, (</span><span class="hl-7">err</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">// Handle errors here.</span><br/><span class="hl-1"> </span><span class="hl-6">throw</span><span class="hl-1"> </span><span class="hl-7">err</span><span class="hl-1">;</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// Grab an arbitrary unused port.</span><br/><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">listen</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;opened server on&#39;</span><span class="hl-1">, </span><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">address</span><span class="hl-1">());</span><br/><span class="hl-1">});</span>
111
- </code><button>Copy</button></pre>
112
- <p><code>server.address()</code> returns <code>null</code> before the <code>&#39;listening&#39;</code> event has been
113
- emitted or after calling <code>server.close()</code>.</p>
114
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.AddressInfo.html" class="tsd-signature-type tsd-kind-interface">AddressInfo</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.90</p>
115
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#address">address</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:638</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="close" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>close</span><a href="#close" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="close.close-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">close</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#close.close-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Stops the server from accepting new connections and keeps existing
116
- connections. This function is asynchronous, the server is finally closed
117
- when all connections are ended and the server emits a <code>&#39;close&#39;</code> event.
118
- The optional <code>callback</code> will be called once the <code>&#39;close&#39;</code> event occurs. Unlike
119
- that event, it will be called with an <code>Error</code> as its only argument if the server
120
- was not open when it was closed.</p>
121
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>Called when the server is closed.</p>
122
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.90</p>
123
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#close">close</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:611</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="emit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>emit</span><a href="#emit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Synchronously calls each of the listeners registered for the event named <code>eventName</code>, in the order they were registered, passing the supplied arguments
124
- to each.</p>
125
- <p>Returns <code>true</code> if the event had listeners, <code>false</code> otherwise.</p>
126
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEmitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// First listener</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">firstListener</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Helloooo! first listener&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-5">// Second listener</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">secondListener</span><span class="hl-1">(</span><span class="hl-7">arg1</span><span class="hl-1">, </span><span class="hl-7">arg2</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`event with parameters </span><span class="hl-3">${</span><span class="hl-7">arg1</span><span class="hl-3">}</span><span class="hl-2">, </span><span class="hl-3">${</span><span class="hl-7">arg2</span><span class="hl-3">}</span><span class="hl-2"> in second listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-5">// Third listener</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">thirdListener</span><span class="hl-1">(...</span><span class="hl-7">args</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">parameters</span><span class="hl-1"> = </span><span class="hl-7">args</span><span class="hl-1">.</span><span class="hl-0">join</span><span class="hl-1">(</span><span class="hl-2">&#39;, &#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`event with parameters </span><span class="hl-3">${</span><span class="hl-7">parameters</span><span class="hl-3">}</span><span class="hl-2"> in third listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">listeners</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// [</span><br/><span class="hl-5">// [Function: firstListener],</span><br/><span class="hl-5">// [Function: secondListener],</span><br/><span class="hl-5">// [Function: thirdListener]</span><br/><span class="hl-5">// ]</span><br/><span class="hl-5">// Helloooo! first listener</span><br/><span class="hl-5">// event with parameters 1, 2 in second listener</span><br/><span class="hl-5">// event with parameters 1, 2, 3, 4, 5 in third listener</span>
127
- </code><button>Copy</button></pre>
128
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.26</p>
129
- </div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:698</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;tlsClientError&quot;</span></span></li><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:699</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">sessionData</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;newSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:700</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">certificate</span>, <span class="tsd-kind-parameter">issuer</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;OCSPRequest&quot;</span></span></li><li><span><span class="tsd-kind-parameter">certificate</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">issuer</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">resp</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:701</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;resumeSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:707</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;secureConnection&quot;</span></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:712</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">line</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;keylog&quot;</span></span></li><li><span><span class="tsd-kind-parameter">line</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Overrides net.Server.emit</p><ul><li>Defined in node_modules/@types/node/tls.d.ts:713</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="eventNames" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>event<wbr/>Names</span><a href="#eventNames" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="eventNames.eventNames-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">event<wbr/>Names</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#eventNames.eventNames-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an array listing the events for which the emitter has registered
130
- listeners. The values in the array are strings or <code>Symbol</code>s.</p>
131
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEE</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {});</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;bar&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">sym</span><span class="hl-1"> = </span><span class="hl-0">Symbol</span><span class="hl-1">(</span><span class="hl-2">&#39;symbol&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-7">sym</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">eventNames</span><span class="hl-1">());</span><br/><span class="hl-5">// Prints: [ &#39;foo&#39;, &#39;bar&#39;, Symbol(symbol) ]</span>
132
- </code><button>Copy</button></pre>
133
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v6.0.0</p>
134
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#eventNames">eventNames</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:900</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="getConnections" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Connections</span><a href="#getConnections" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="getConnections.getConnections-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Connections</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">cb</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#getConnections.getConnections-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Asynchronously get the number of concurrent connections on the server. Works
135
- when sockets were sent to forks.</p>
136
- <p>Callback should take two arguments <code>err</code> and <code>count</code>.</p>
137
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">cb</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.7</p>
138
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#getConnections">getConnections</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:646</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="getMaxListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Max<wbr/>Listeners</span><a href="#getMaxListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="getMaxListeners.getMaxListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Max<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#getMaxListeners.getMaxListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the current max listener value for the <code>EventEmitter</code> which is either
139
- set by <code>emitter.setMaxListeners(n)</code> or defaults to <a href="_internal_.Server-3.html#defaultMaxListeners" class="tsd-kind-property">defaultMaxListeners</a>.</p>
140
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v1.0.0</p>
141
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#getMaxListeners">getMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:752</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getTicketKeys" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Ticket<wbr/>Keys</span><a href="#getTicketKeys" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="getTicketKeys.getTicketKeys-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Ticket<wbr/>Keys</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#getTicketKeys.getTicketKeys-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the session ticket keys.</p>
142
- <p>See <code>Session Resumption</code> for more information.</p>
143
- </div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><p>A 48-byte buffer containing the session ticket keys.</p>
144
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v3.0.0</p>
145
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:650</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="listen" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>listen</span><a href="#listen" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="listen.listen-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listen</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">port</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">hostname</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">backlog</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">listeningListener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#listen.listen-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Start a server listening for connections. A <code>net.Server</code> can be a TCP or
146
- an <code>IPC</code> server depending on what it listens to.</p>
147
- <p>Possible signatures:</p>
148
- <ul>
149
- <li><code>server.listen(handle[, backlog][, callback])</code></li>
150
- <li><code>server.listen(options[, callback])</code></li>
151
- <li><code>server.listen(path[, backlog][, callback])</code> for <code>IPC</code> servers</li>
152
- <li><code>server.listen([port[, host[, backlog]]][, callback])</code> for TCP servers</li>
153
- </ul>
154
- <p>This function is asynchronous. When the server starts listening, the <code>&#39;listening&#39;</code> event will be emitted. The last parameter <code>callback</code>will be added as a listener for the <code>&#39;listening&#39;</code>
155
- event.</p>
156
- <p>All <code>listen()</code> methods can take a <code>backlog</code> parameter to specify the maximum
157
- length of the queue of pending connections. The actual length will be determined
158
- by the OS through sysctl settings such as <code>tcp_max_syn_backlog</code> and <code>somaxconn</code> on Linux. The default value of this parameter is 511 (not 512).</p>
159
- <p>All <a href="_internal_.Socket.html" class="tsd-kind-class">Socket</a> are set to <code>SO_REUSEADDR</code> (see <a href="https://man7.org/linux/man-pages/man7/socket.7.html"><code>socket(7)</code></a> for
160
- details).</p>
161
- <p>The <code>server.listen()</code> method can be called again if and only if there was an
162
- error during the first <code>server.listen()</code> call or <code>server.close()</code> has been
163
- called. Otherwise, an <code>ERR_SERVER_ALREADY_LISTEN</code> error will be thrown.</p>
164
- <p>One of the most common errors raised when listening is <code>EADDRINUSE</code>.
165
- This happens when another server is already listening on the requested<code>port</code>/<code>path</code>/<code>handle</code>. One way to handle this would be to retry
166
- after a certain amount of time:</p>
167
- <pre><code class="language-js"><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">, (</span><span class="hl-7">e</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">if</span><span class="hl-1"> (</span><span class="hl-7">e</span><span class="hl-1">.</span><span class="hl-7">code</span><span class="hl-1"> === </span><span class="hl-2">&#39;EADDRINUSE&#39;</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">&#39;Address in use, retrying...&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-0">setTimeout</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">close</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">listen</span><span class="hl-1">(</span><span class="hl-4">PORT</span><span class="hl-1">, </span><span class="hl-4">HOST</span><span class="hl-1">);</span><br/><span class="hl-1"> }, </span><span class="hl-9">1000</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span>
168
- </code><button>Copy</button></pre>
169
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">port</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">hostname</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">backlog</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">listeningListener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listen">listen</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:592</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="listen.listen-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listen</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">port</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">hostname</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">listeningListener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#listen.listen-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">port</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">hostname</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">listeningListener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listen">listen</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:593</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="listen.listen-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listen</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">port</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">backlog</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">listeningListener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#listen.listen-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">port</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">backlog</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">listeningListener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listen">listen</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:594</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="listen.listen-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listen</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">port</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">listeningListener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#listen.listen-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">port</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">listeningListener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listen">listen</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:595</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="listen.listen-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listen</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">path</span>, <span class="tsd-kind-parameter">backlog</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">listeningListener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#listen.listen-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">backlog</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">listeningListener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listen">listen</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:596</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="listen.listen-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listen</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">path</span>, <span class="tsd-kind-parameter">listeningListener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#listen.listen-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">listeningListener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listen">listen</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:597</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="listen.listen-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listen</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span>, <span class="tsd-kind-parameter">listeningListener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#listen.listen-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ListenOptions.html" class="tsd-signature-type tsd-kind-interface">ListenOptions</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">listeningListener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listen">listen</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:598</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="listen.listen-8" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listen</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">handle</span>, <span class="tsd-kind-parameter">backlog</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">listeningListener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#listen.listen-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">handle</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">backlog</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">listeningListener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listen">listen</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:599</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="listen.listen-9" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listen</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">handle</span>, <span class="tsd-kind-parameter">listeningListener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#listen.listen-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">handle</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">listeningListener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listen">listen</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:600</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="listenerCount" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>listener<wbr/>Count</span><a href="#listenerCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="listenerCount.listenerCount-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listener<wbr/>Count</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Server-3.html#listenerCount.listenerCount-1.K-1">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#listenerCount.listenerCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the number of listeners listening for the event named <code>eventName</code>.
170
- If <code>listener</code> is provided, it will return how many times the listener is found
171
- in the list of the listeners of the event.</p>
172
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="listenerCount.listenerCount-1.K-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span><div class="tsd-comment tsd-typography"><p>The name of the event being listened for</p>
173
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-type">Function</span></span><div class="tsd-comment tsd-typography"><p>The event handler function</p>
174
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v3.2.0</p>
175
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listenerCount">listenerCount</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:846</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="listeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>listeners</span><a href="#listeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="listeners.listeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Server-3.html#listeners.listeners-1.K-2">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span><a href="#listeners.listeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>.</p>
176
- <pre><code class="language-js"><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">util</span><span class="hl-1">.</span><span class="hl-0">inspect</span><span class="hl-1">(</span><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">listeners</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: [ [Function] ]</span>
177
- </code><button>Copy</button></pre>
178
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="listeners.listeners-1.K-2" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.26</p>
179
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listeners">listeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:765</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="off" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>off</span><a href="#off" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="off.off-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">off</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Server-3.html#off.off-1.K-3">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#off.off-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Alias for <code>emitter.removeListener()</code>.</p>
180
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="off.off-1.K-3" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v10.0.0</p>
181
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#off">off</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:725</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="on" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>on</span><a href="#on" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="on.on-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds the <code>listener</code> function to the end of the listeners array for the event
182
- named <code>eventName</code>. No checks are made to see if the <code>listener</code> has already
183
- been added. Multiple calls passing the same combination of <code>eventName</code> and
184
- <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
185
- <pre><code class="language-js"><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
186
- </code><button>Copy</button></pre>
187
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
188
- <p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependListener()</code> method can be used as an alternative to add the
189
- event listener to the beginning of the listeners array.</p>
190
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEE</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">prependListener</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// b</span><br/><span class="hl-5">// a</span>
191
- </code><button>Copy</button></pre>
192
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
193
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
194
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.101</p>
195
- </div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:714</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;tlsClientError&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:715</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;newSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">sessionData</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">sessionData</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:716</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;OCSPRequest&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">certificate</span>, <span class="tsd-kind-parameter">issuer</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">certificate</span>, <span class="tsd-kind-parameter">issuer</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">certificate</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">issuer</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">resp</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:717</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;resumeSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:725</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;secureConnection&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:729</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;keylog&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">line</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides net.Server.on</p><ul><li>Defined in node_modules/@types/node/tls.d.ts:730</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="once" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>once</span><a href="#once" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="once.once-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong> <code>listener</code> function for the event named <code>eventName</code>. The
196
- next time <code>eventName</code> is triggered, this listener is removed and then invoked.</p>
197
- <pre><code class="language-js"><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
198
- </code><button>Copy</button></pre>
199
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
200
- <p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependOnceListener()</code> method can be used as an alternative to add the
201
- event listener to the beginning of the listeners array.</p>
202
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEE</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">prependOnceListener</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// b</span><br/><span class="hl-5">// a</span>
203
- </code><button>Copy</button></pre>
204
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
205
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
206
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.3.0</p>
207
- </div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:731</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;tlsClientError&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:732</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;newSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">sessionData</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">sessionData</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:733</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;OCSPRequest&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">certificate</span>, <span class="tsd-kind-parameter">issuer</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">certificate</span>, <span class="tsd-kind-parameter">issuer</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">certificate</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">issuer</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">resp</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:737</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;resumeSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:745</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;secureConnection&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:749</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;keylog&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">line</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides net.Server.once</p><ul><li>Defined in node_modules/@types/node/tls.d.ts:750</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="prependListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prepend<wbr/>Listener</span><a href="#prependListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds the <code>listener</code> function to the <em>beginning</em> of the listeners array for the
208
- event named <code>eventName</code>. No checks are made to see if the <code>listener</code> has
209
- already been added. Multiple calls passing the same combination of <code>eventName</code>
210
- and <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
211
- <pre><code class="language-js"><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">prependListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
212
- </code><button>Copy</button></pre>
213
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
214
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
215
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
216
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v6.0.0</p>
217
- </div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:751</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;tlsClientError&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:752</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;newSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">sessionData</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">sessionData</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:753</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;OCSPRequest&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">certificate</span>, <span class="tsd-kind-parameter">issuer</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">certificate</span>, <span class="tsd-kind-parameter">issuer</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">certificate</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">issuer</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">resp</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:757</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;resumeSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:765</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;secureConnection&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:769</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;keylog&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">line</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides net.Server.prependListener</p><ul><li>Defined in node_modules/@types/node/tls.d.ts:770</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="prependOnceListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prepend<wbr/>Once<wbr/>Listener</span><a href="#prependOnceListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong><code>listener</code> function for the event named <code>eventName</code> to the <em>beginning</em> of the listeners array. The next time <code>eventName</code> is triggered, this
218
- listener is removed, and then invoked.</p>
219
- <pre><code class="language-js"><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">prependOnceListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
220
- </code><button>Copy</button></pre>
221
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
222
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
223
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
224
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v6.0.0</p>
225
- </div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:771</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;tlsClientError&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:772</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;newSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">sessionData</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">sessionData</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:773</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;OCSPRequest&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">certificate</span>, <span class="tsd-kind-parameter">issuer</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">certificate</span>, <span class="tsd-kind-parameter">issuer</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">certificate</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">issuer</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">resp</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">resp</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:777</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;resumeSession&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sessionId</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sessionId</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">sessionData</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">sessionData</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:785</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;secureConnection&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:789</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;keylog&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span>, <span class="tsd-kind-parameter">tlsSocket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">line</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span></li><li><span><span class="tsd-kind-parameter">tlsSocket</span>: <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides net.Server.prependOnceListener</p><ul><li>Defined in node_modules/@types/node/tls.d.ts:790</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="rawListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>raw<wbr/>Listeners</span><a href="#rawListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="rawListeners.rawListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">raw<wbr/>Listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Server-3.html#rawListeners.rawListeners-1.K-4">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span><a href="#rawListeners.rawListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>,
226
- including any wrappers (such as those created by <code>.once()</code>).</p>
227
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">emitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;log once&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-5">// Returns a new Array with a function `onceWrapper` which has a property</span><br/><span class="hl-5">// `listener` which contains the original listener bound above</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">listeners</span><span class="hl-1"> = </span><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">rawListeners</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">logFnWrapper</span><span class="hl-1"> = </span><span class="hl-7">listeners</span><span class="hl-1">[</span><span class="hl-9">0</span><span class="hl-1">];</span><br/><br/><span class="hl-5">// Logs &quot;log once&quot; to the console and does not unbind the `once` event</span><br/><span class="hl-7">logFnWrapper</span><span class="hl-1">.</span><span class="hl-0">listener</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// Logs &quot;log once&quot; to the console and removes the listener</span><br/><span class="hl-0">logFnWrapper</span><span class="hl-1">();</span><br/><br/><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;log persistently&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Will return a new Array with a single function bound by `.on()` above</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">newListeners</span><span class="hl-1"> = </span><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">rawListeners</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Logs &quot;log persistently&quot; twice</span><br/><span class="hl-7">newListeners</span><span class="hl-1">[</span><span class="hl-9">0</span><span class="hl-1">]();</span><br/><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span>
228
- </code><button>Copy</button></pre>
229
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="rawListeners.rawListeners-1.K-4" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v9.4.0</p>
230
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#rawListeners">rawListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:796</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="ref" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ref</span><a href="#ref" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="ref.ref-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ref</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#ref.ref-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Opposite of <code>unref()</code>, calling <code>ref()</code> on a previously <code>unref</code>ed server will <em>not</em> let the program exit if it&#39;s the only server left (the default behavior).
231
- If the server is <code>ref</code>ed calling <code>ref()</code> again will have no effect.</p>
232
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.1</p>
233
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#ref">ref</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:652</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="removeAllListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>All<wbr/>Listeners</span><a href="#removeAllListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="removeAllListeners.removeAllListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>All<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeAllListeners.removeAllListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes all listeners, or those of the specified <code>eventName</code>.</p>
234
- <p>It is bad practice to remove listeners added elsewhere in the code,
235
- particularly when the <code>EventEmitter</code> instance was created by some other
236
- component or module (e.g. sockets or file streams).</p>
237
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
238
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.26</p>
239
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#removeAllListeners">removeAllListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:736</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="removeListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Listener</span><a href="#removeListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Server-3.html#removeListener.removeListener-1.K-5">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes the specified <code>listener</code> from the listener array for the event named <code>eventName</code>.</p>
240
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">callback</span><span class="hl-1"> = (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-7">callback</span><span class="hl-1">);</span><br/><span class="hl-5">// ...</span><br/><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-7">callback</span><span class="hl-1">);</span>
241
- </code><button>Copy</button></pre>
242
- <p><code>removeListener()</code> will remove, at most, one instance of a listener from the
243
- listener array. If any single listener has been added multiple times to the
244
- listener array for the specified <code>eventName</code>, then <code>removeListener()</code> must be
245
- called multiple times to remove each instance.</p>
246
- <p>Once an event is emitted, all listeners attached to it at the
247
- time of emitting are called in order. This implies that any <code>removeListener()</code> or <code>removeAllListeners()</code> calls <em>after</em> emitting and <em>before</em> the last listener finishes execution
248
- will not remove them from<code>emit()</code> in progress. Subsequent events behave as expected.</p>
249
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">class</span><span class="hl-1"> </span><span class="hl-8">MyEmitter</span><span class="hl-1"> </span><span class="hl-3">extends</span><span class="hl-1"> </span><span class="hl-8">EventEmitter</span><span class="hl-1"> {}</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEmitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">MyEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">callbackA</span><span class="hl-1"> = () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;A&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-7">callbackB</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">callbackB</span><span class="hl-1"> = () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;B&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-7">callbackA</span><span class="hl-1">);</span><br/><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-7">callbackB</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// callbackA removes listener callbackB but it will still be called.</span><br/><span class="hl-5">// Internal listener array at time of emit [callbackA, callbackB]</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// A</span><br/><span class="hl-5">// B</span><br/><br/><span class="hl-5">// callbackB is now removed.</span><br/><span class="hl-5">// Internal listener array [callbackA]</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// A</span>
250
- </code><button>Copy</button></pre>
251
- <p>Because listeners are managed using an internal array, calling this will
252
- change the position indices of any listener registered <em>after</em> the listener
253
- being removed. This will not impact the order in which listeners are called,
254
- but it means that any copies of the listener array as returned by
255
- the <code>emitter.listeners()</code> method will need to be recreated.</p>
256
- <p>When a single function has been added as a handler multiple times for a single
257
- event (as in the example below), <code>removeListener()</code> will remove the most
258
- recently added instance. In the example the <code>once(&#39;ping&#39;)</code> listener is removed:</p>
259
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">pong</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;pong&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-7">pong</span><span class="hl-1">);</span><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-7">pong</span><span class="hl-1">);</span><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-7">pong</span><span class="hl-1">);</span><br/><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">);</span>
260
- </code><button>Copy</button></pre>
261
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
262
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="removeListener.removeListener-1.K-5" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.26</p>
263
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:720</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="setMaxListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Max<wbr/>Listeners</span><a href="#setMaxListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="setMaxListeners.setMaxListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Max<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#setMaxListeners.setMaxListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>By default <code>EventEmitter</code>s will print a warning if more than <code>10</code> listeners are
264
- added for a particular event. This is a useful default that helps finding
265
- memory leaks. The <code>emitter.setMaxListeners()</code> method allows the limit to be
266
- modified for this specific <code>EventEmitter</code> instance. The value can be set to <code>Infinity</code> (or <code>0</code>) to indicate an unlimited number of listeners.</p>
267
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
268
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.3.5</p>
269
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#setMaxListeners">setMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:746</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="setSecureContext" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Secure<wbr/>Context</span><a href="#setSecureContext" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="setSecureContext.setSecureContext-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Secure<wbr/>Context</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setSecureContext.setSecureContext-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The <code>server.setSecureContext()</code> method replaces the secure context of an
270
- existing server. Existing connections to the server are not interrupted.</p>
271
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.SecureContextOptions.html" class="tsd-signature-type tsd-kind-interface">SecureContextOptions</a></span><div class="tsd-comment tsd-typography"><p>An object containing any of the possible properties from the createSecureContext <code>options</code> arguments (e.g. <code>key</code>, <code>cert</code>, <code>ca</code>, etc).</p>
272
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v11.0.0</p>
273
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:657</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="setTicketKeys" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Ticket<wbr/>Keys</span><a href="#setTicketKeys" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="setTicketKeys.setTicketKeys-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Ticket<wbr/>Keys</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">keys</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setTicketKeys.setTicketKeys-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Sets the session ticket keys.</p>
274
- <p>Changes to the ticket keys are effective only for future server connections.
275
- Existing or currently pending server connections will use the previous keys.</p>
276
- <p>See <code>Session Resumption</code> for more information.</p>
277
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">keys</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span><div class="tsd-comment tsd-typography"><p>A 48-byte buffer containing the session ticket keys.</p>
278
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v3.0.0</p>
279
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:668</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="unref" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>unref</span><a href="#unref" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="unref.unref-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">unref</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#unref.unref-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Calling <code>unref()</code> on a server will allow the program to exit if this is the only
280
- active server in the event system. If the server is already <code>unref</code>ed calling<code>unref()</code> again will have no effect.</p>
281
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.1</p>
282
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#unref">unref</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:658</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="addAbortListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>add<wbr/>Abort<wbr/>Listener</span><a href="#addAbortListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="addAbortListener.addAbortListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Abort<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signal</span>, <span class="tsd-kind-parameter">resource</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.Disposable.html" class="tsd-signature-type tsd-kind-interface">Disposable</a><a href="#addAbortListener.addAbortListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><code class="tsd-tag ts-flagExperimental">Experimental</code> <div class="tsd-comment tsd-typography"><p>Listens once to the <code>abort</code> event on the provided <code>signal</code>.</p>
283
- <p>Listening to the <code>abort</code> event on abort signals is unsafe and may
284
- lead to resource leaks since another third party with the signal can
285
- call <code>e.stopImmediatePropagation()</code>. Unfortunately Node.js cannot change
286
- this since it would violate the web standard. Additionally, the original
287
- API makes it easy to forget to remove listeners.</p>
288
- <p>This API allows safely using <code>AbortSignal</code>s in Node.js APIs by solving these
289
- two issues by listening to the event such that <code>stopImmediatePropagation</code> does
290
- not prevent the listener from running.</p>
291
- <p>Returns a disposable so that it may be unsubscribed from more easily.</p>
292
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">addAbortListener</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">example</span><span class="hl-1">(</span><span class="hl-7">signal</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-7">disposable</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">signal</span><span class="hl-1">.</span><span class="hl-0">addEventListener</span><span class="hl-1">(</span><span class="hl-2">&#39;abort&#39;</span><span class="hl-1">, (</span><span class="hl-7">e</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">e</span><span class="hl-1">.</span><span class="hl-0">stopImmediatePropagation</span><span class="hl-1">());</span><br/><span class="hl-1"> </span><span class="hl-7">disposable</span><span class="hl-1"> = </span><span class="hl-0">addAbortListener</span><span class="hl-1">(</span><span class="hl-7">signal</span><span class="hl-1">, (</span><span class="hl-7">e</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">// Do something when signal is aborted.</span><br/><span class="hl-1"> });</span><br/><span class="hl-1"> } </span><span class="hl-6">finally</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">disposable</span><span class="hl-1">?.[</span><span class="hl-7">Symbol</span><span class="hl-1">.</span><span class="hl-7">dispose</span><span class="hl-1">]();</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
293
- </code><button>Copy</button></pre>
294
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signal</span>: <span class="tsd-signature-type">AbortSignal</span></span></li><li><span><span class="tsd-kind-parameter">resource</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">Event</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.Disposable.html" class="tsd-signature-type tsd-kind-interface">Disposable</a></h4><p>Disposable that removes the <code>abort</code> listener.</p>
295
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v20.5.0</p>
296
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#addAbortListener">addAbortListener</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:415</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="getEventListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>get<wbr/>Event<wbr/>Listeners</span><a href="#getEventListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="getEventListeners.getEventListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Event<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span><a href="#getEventListeners.getEventListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>.</p>
297
- <p>For <code>EventEmitter</code>s this behaves exactly the same as calling <code>.listeners</code> on
298
- the emitter.</p>
299
- <p>For <code>EventTarget</code>s this is the only way to get the event listeners for the
300
- event target. This is useful for debugging and diagnostic purposes.</p>
301
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">getEventListeners</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">listener</span><span class="hl-1"> = () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Events are fun&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-7">listener</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getEventListeners</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">)); </span><span class="hl-5">// [ [Function: listener] ]</span><br/><span class="hl-1">}</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">et</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventTarget</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">listener</span><span class="hl-1"> = () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Events are fun&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">et</span><span class="hl-1">.</span><span class="hl-0">addEventListener</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-7">listener</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getEventListeners</span><span class="hl-1">(</span><span class="hl-7">et</span><span class="hl-1">, </span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">)); </span><span class="hl-5">// [ [Function: listener] ]</span><br/><span class="hl-1">}</span>
302
- </code><button>Copy</button></pre>
303
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</span></span></li><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v15.2.0, v14.17.0</p>
304
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#getEventListeners">getEventListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:336</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="getMaxListeners-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>get<wbr/>Max<wbr/>Listeners</span><a href="#getMaxListeners-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="getMaxListeners-2.getMaxListeners-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Max<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#getMaxListeners-2.getMaxListeners-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the currently set max amount of listeners.</p>
305
- <p>For <code>EventEmitter</code>s this behaves exactly the same as calling <code>.getMaxListeners</code> on
306
- the emitter.</p>
307
- <p>For <code>EventTarget</code>s this is the only way to get the max event listeners for the
308
- event target. If the number of event handlers on a single EventTarget exceeds
309
- the max set, the EventTarget will print a warning.</p>
310
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">getMaxListeners</span><span class="hl-1">, </span><span class="hl-7">setMaxListeners</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getMaxListeners</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">)); </span><span class="hl-5">// 10</span><br/><span class="hl-1"> </span><span class="hl-0">setMaxListeners</span><span class="hl-1">(</span><span class="hl-9">11</span><span class="hl-1">, </span><span class="hl-7">ee</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getMaxListeners</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">)); </span><span class="hl-5">// 11</span><br/><span class="hl-1">}</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">et</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventTarget</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getMaxListeners</span><span class="hl-1">(</span><span class="hl-7">et</span><span class="hl-1">)); </span><span class="hl-5">// 10</span><br/><span class="hl-1"> </span><span class="hl-0">setMaxListeners</span><span class="hl-1">(</span><span class="hl-9">11</span><span class="hl-1">, </span><span class="hl-7">et</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getMaxListeners</span><span class="hl-1">(</span><span class="hl-7">et</span><span class="hl-1">)); </span><span class="hl-5">// 11</span><br/><span class="hl-1">}</span>
311
- </code><button>Copy</button></pre>
312
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v19.9.0</p>
313
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#getMaxListeners-2">getMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:365</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="listenerCount-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span class="deprecated">listener<wbr/>Count</span><a href="#listenerCount-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="listenerCount-2.listenerCount-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listener<wbr/>Count</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#listenerCount-2.listenerCount-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>A class method that returns the number of listeners for the given <code>eventName</code> registered on the given <code>emitter</code>.</p>
314
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1">, </span><span class="hl-7">listenerCount</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEmitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {});</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {});</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">listenerCount</span><span class="hl-1">(</span><span class="hl-7">myEmitter</span><span class="hl-1">, </span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 2</span>
315
- </code><button>Copy</button></pre>
316
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The emitter to query</p>
317
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span><div class="tsd-comment tsd-typography"><p>The event name</p>
318
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.12</p>
319
- <h4>Deprecated</h4><p>Since v3.2.0 - Use <code>listenerCount</code> instead.</p>
320
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#listenerCount-2">listenerCount</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:308</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="on-8" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>on</span><a href="#on-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="on-8.on-9" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#on-8.on-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">on</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-6">import</span><span class="hl-1"> </span><span class="hl-7">process</span><span class="hl-1"> </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:process&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// Emit later on</span><br/><span class="hl-7">process</span><span class="hl-1">.</span><span class="hl-0">nextTick</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;bar&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-9">42</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-6">for</span><span class="hl-1"> </span><span class="hl-6">await</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">event</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">)) {</span><br/><span class="hl-1"> </span><span class="hl-5">// The execution of this inner block is synchronous and it</span><br/><span class="hl-1"> </span><span class="hl-5">// processes one event at a time (even with await). Do not use</span><br/><span class="hl-1"> </span><span class="hl-5">// if concurrent execution is required.</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">event</span><span class="hl-1">); </span><span class="hl-5">// prints [&#39;bar&#39;] [42]</span><br/><span class="hl-1">}</span><br/><span class="hl-5">// Unreachable here</span>
321
- </code><button>Copy</button></pre>
322
- <p>Returns an <code>AsyncIterator</code> that iterates <code>eventName</code> events. It will throw
323
- if the <code>EventEmitter</code> emits <code>&#39;error&#39;</code>. It removes all listeners when
324
- exiting the loop. The <code>value</code> returned by each iteration is an array
325
- composed of the emitted event arguments.</p>
326
- <p>An <code>AbortSignal</code> can be used to cancel waiting on events:</p>
327
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">on</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-6">import</span><span class="hl-1"> </span><span class="hl-7">process</span><span class="hl-1"> </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:process&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ac</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AbortController</span><span class="hl-1">();</span><br/><br/><span class="hl-1">(</span><span class="hl-3">async</span><span class="hl-1"> () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-1"> </span><span class="hl-5">// Emit later on</span><br/><span class="hl-1"> </span><span class="hl-7">process</span><span class="hl-1">.</span><span class="hl-0">nextTick</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;bar&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-9">42</span><span class="hl-1">);</span><br/><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-6">for</span><span class="hl-1"> </span><span class="hl-6">await</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">event</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, { </span><span class="hl-7">signal:</span><span class="hl-1"> </span><span class="hl-7">ac</span><span class="hl-1">.</span><span class="hl-7">signal</span><span class="hl-1"> })) {</span><br/><span class="hl-1"> </span><span class="hl-5">// The execution of this inner block is synchronous and it</span><br/><span class="hl-1"> </span><span class="hl-5">// processes one event at a time (even with await). Do not use</span><br/><span class="hl-1"> </span><span class="hl-5">// if concurrent execution is required.</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">event</span><span class="hl-1">); </span><span class="hl-5">// prints [&#39;bar&#39;] [42]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><span class="hl-5">// Unreachable here</span><br/><span class="hl-1">})();</span><br/><br/><span class="hl-7">process</span><span class="hl-1">.</span><span class="hl-0">nextTick</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">ac</span><span class="hl-1">.</span><span class="hl-0">abort</span><span class="hl-1">());</span>
328
- </code><button>Copy</button></pre>
329
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span></span></li><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span><div class="tsd-comment tsd-typography"><p>The name of the event being listened for</p>
330
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.StaticEventEmitterOptions.html" class="tsd-signature-type tsd-kind-interface">StaticEventEmitterOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><p>An <code>AsyncIterator</code> that iterates <code>eventName</code> events emitted by the <code>emitter</code></p>
331
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.6.0, v12.16.0</p>
332
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#on-7">on</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:281</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on-8.on-10" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#on-8.on-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <span class="tsd-signature-type">EventTarget</span></span></li><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.StaticEventEmitterOptions.html" class="tsd-signature-type tsd-kind-interface">StaticEventEmitterOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#on-7">on</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:286</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="once-8" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>once</span><a href="#once-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="once-8.once-9" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#once-8.once-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a <code>Promise</code> that is fulfilled when the <code>EventEmitter</code> emits the given
333
- event or that is rejected if the <code>EventEmitter</code> emits <code>&#39;error&#39;</code> while waiting.
334
- The <code>Promise</code> will resolve with an array of all the arguments emitted to the
335
- given event.</p>
336
- <p>This method is intentionally generic and works with the web platform <a href="https://dom.spec.whatwg.org/#interface-eventtarget">EventTarget</a> interface, which has no special<code>&#39;error&#39;</code> event
337
- semantics and does not listen to the <code>&#39;error&#39;</code> event.</p>
338
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">once</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-6">import</span><span class="hl-1"> </span><span class="hl-7">process</span><span class="hl-1"> </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:process&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-7">process</span><span class="hl-1">.</span><span class="hl-0">nextTick</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;myevent&#39;</span><span class="hl-1">, </span><span class="hl-9">42</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> [</span><span class="hl-4">value</span><span class="hl-1">] = </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;myevent&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">value</span><span class="hl-1">);</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">err</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Error</span><span class="hl-1">(</span><span class="hl-2">&#39;kaboom&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">process</span><span class="hl-1">.</span><span class="hl-0">nextTick</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">, </span><span class="hl-7">err</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-6">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;myevent&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">} </span><span class="hl-6">catch</span><span class="hl-1"> (</span><span class="hl-7">err</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">&#39;error happened&#39;</span><span class="hl-1">, </span><span class="hl-7">err</span><span class="hl-1">);</span><br/><span class="hl-1">}</span>
339
- </code><button>Copy</button></pre>
340
- <p>The special handling of the <code>&#39;error&#39;</code> event is only used when <code>events.once()</code> is used to wait for another event. If <code>events.once()</code> is used to wait for the
341
- &#39;<code>error&#39;</code> event itself, then it is treated as any other kind of event without
342
- special handling:</p>
343
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1">, </span><span class="hl-7">once</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">then</span><span class="hl-1">(([</span><span class="hl-7">err</span><span class="hl-1">]) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;ok&#39;</span><span class="hl-1">, </span><span class="hl-7">err</span><span class="hl-1">.</span><span class="hl-7">message</span><span class="hl-1">))</span><br/><span class="hl-1"> .</span><span class="hl-0">catch</span><span class="hl-1">((</span><span class="hl-7">err</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">, </span><span class="hl-7">err</span><span class="hl-1">.</span><span class="hl-7">message</span><span class="hl-1">));</span><br/><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">, </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Error</span><span class="hl-1">(</span><span class="hl-2">&#39;boom&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-5">// Prints: ok boom</span>
344
- </code><button>Copy</button></pre>
345
- <p>An <code>AbortSignal</code> can be used to cancel waiting for the event:</p>
346
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1">, </span><span class="hl-7">once</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ac</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AbortController</span><span class="hl-1">();</span><br/><br/><span class="hl-3">async</span><span class="hl-1"> </span><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">foo</span><span class="hl-1">(</span><span class="hl-7">emitter</span><span class="hl-1">, </span><span class="hl-7">event</span><span class="hl-1">, </span><span class="hl-7">signal</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-7">emitter</span><span class="hl-1">, </span><span class="hl-7">event</span><span class="hl-1">, { </span><span class="hl-7">signal</span><span class="hl-1"> });</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;event emitted!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> } </span><span class="hl-6">catch</span><span class="hl-1"> (</span><span class="hl-7">error</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">if</span><span class="hl-1"> (</span><span class="hl-7">error</span><span class="hl-1">.</span><span class="hl-7">name</span><span class="hl-1"> === </span><span class="hl-2">&#39;AbortError&#39;</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">&#39;Waiting for the event was canceled!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> } </span><span class="hl-6">else</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">&#39;There was an error&#39;</span><span class="hl-1">, </span><span class="hl-7">error</span><span class="hl-1">.</span><span class="hl-7">message</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-0">foo</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-7">ac</span><span class="hl-1">.</span><span class="hl-7">signal</span><span class="hl-1">);</span><br/><span class="hl-7">ac</span><span class="hl-1">.</span><span class="hl-0">abort</span><span class="hl-1">(); </span><span class="hl-5">// Abort waiting for the event</span><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">); </span><span class="hl-5">// Prints: Waiting for the event was canceled!</span>
347
- </code><button>Copy</button></pre>
348
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span></span></li><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.StaticEventEmitterOptions.html" class="tsd-signature-type tsd-kind-interface">StaticEventEmitterOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v11.13.0, v10.16.0</p>
349
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#once-7">once</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:216</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once-8.once-10" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#once-8.once-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <span class="tsd-signature-type">EventTarget</span></span></li><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.StaticEventEmitterOptions.html" class="tsd-signature-type tsd-kind-interface">StaticEventEmitterOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#once-7">once</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:221</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="setMaxListeners-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>set<wbr/>Max<wbr/>Listeners</span><a href="#setMaxListeners-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="setMaxListeners-2.setMaxListeners-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Max<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">eventTargets</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setMaxListeners-2.setMaxListeners-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">setMaxListeners</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">target</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventTarget</span><span class="hl-1">();</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">emitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-0">setMaxListeners</span><span class="hl-1">(</span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-7">target</span><span class="hl-1">, </span><span class="hl-7">emitter</span><span class="hl-1">);</span>
350
- </code><button>Copy</button></pre>
351
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>A non-negative number. The maximum number of listeners per <code>EventTarget</code> event.</p>
352
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">eventTargets</span>: <span class="tsd-signature-symbol">(</span><a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v15.4.0</p>
353
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Server-2.html">Server</a>.<a href="_internal_.Server-2.html#setMaxListeners-2">setMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:380</li></ul></aside></li></ul></section></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#constructor" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a><a href="#connections" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>connections</span></a><a href="#listening" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>listening</span></a><a href="#maxConnections" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Connections</span></a><a href="#captureRejectionSymbol" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>capture<wbr/>Rejection<wbr/>Symbol</span></a><a href="#captureRejections" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>capture<wbr/>Rejections</span></a><a href="#defaultMaxListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>default<wbr/>Max<wbr/>Listeners</span></a><a href="#errorMonitor" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>error<wbr/>Monitor</span></a><a href="#_asyncDispose_" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[async<wbr/>Dispose]</span></a><a href="#_captureRejectionSymbol_" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[capture<wbr/>Rejection<wbr/>Symbol]</span></a><a href="#addContext" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Context</span></a><a href="#addListener" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Listener</span></a><a href="#address" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>address</span></a><a href="#close" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>close</span></a><a href="#emit" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>emit</span></a><a href="#eventNames" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>event<wbr/>Names</span></a><a href="#getConnections" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Connections</span></a><a href="#getMaxListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Max<wbr/>Listeners</span></a><a href="#getTicketKeys" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Ticket<wbr/>Keys</span></a><a href="#listen" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listen</span></a><a href="#listenerCount" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listener<wbr/>Count</span></a><a href="#listeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listeners</span></a><a href="#off" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>off</span></a><a href="#on" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>on</span></a><a href="#once" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>once</span></a><a href="#prependListener" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepend<wbr/>Listener</span></a><a href="#prependOnceListener" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepend<wbr/>Once<wbr/>Listener</span></a><a href="#rawListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>raw<wbr/>Listeners</span></a><a href="#ref" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ref</span></a><a href="#removeAllListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>All<wbr/>Listeners</span></a><a href="#removeListener" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Listener</span></a><a href="#setMaxListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Max<wbr/>Listeners</span></a><a href="#setSecureContext" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Secure<wbr/>Context</span></a><a href="#setTicketKeys" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Ticket<wbr/>Keys</span></a><a href="#unref" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>unref</span></a><a href="#addAbortListener" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Abort<wbr/>Listener</span></a><a href="#getEventListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Event<wbr/>Listeners</span></a><a href="#getMaxListeners-2" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Max<wbr/>Listeners</span></a><a href="#listenerCount-2" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listener<wbr/>Count</span></a><a href="#on-8" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>on</span></a><a href="#once-8" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>once</span></a><a href="#setMaxListeners-2" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Max<wbr/>Listeners</span></a></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@codebolt/codeboltjs</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>