@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,947 +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>TLSSocket | @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_.TLSSocket.html">TLSSocket</a></li></ul><h1>Class TLSSocket</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Performs transparent encryption of written data and all required TLS
2
- negotiation.</p>
3
- <p>Instances of <code>tls.TLSSocket</code> implement the duplex <code>Stream</code> interface.</p>
4
- <p>Methods that return TLS connection metadata (e.g.<a href="_internal_.TLSSocket.html#getPeerCertificate" class="tsd-kind-method">TLSSocket.getPeerCertificate</a>) will only return data while the
5
- connection is open.</p>
6
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.4</p>
7
- </div></section><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a class="link" href="../hierarchy.html#<internal>.TLSSocket">view full</a>)</h4><ul class="tsd-hierarchy"><li><a href="_internal_.Socket.html" class="tsd-signature-type tsd-kind-class">Socket</a><ul class="tsd-hierarchy"><li><span class="target">TLSSocket</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:219</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_.TLSSocket.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>
8
- </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="_internal_.TLSSocket.html#allowHalfOpen" 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>allow<wbr/>Half<wbr/>Open</span></a>
9
- <a href="_internal_.TLSSocket.html#alpnProtocol" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>alpn<wbr/>Protocol</span></a>
10
- <a href="_internal_.TLSSocket.html#authorizationError" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>authorization<wbr/>Error</span></a>
11
- <a href="_internal_.TLSSocket.html#authorized" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>authorized</span></a>
12
- <a href="_internal_.TLSSocket.html#autoSelectFamilyAttemptedAddresses" 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>auto<wbr/>Select<wbr/>Family<wbr/>Attempted<wbr/>Addresses</span></a>
13
- <a href="_internal_.TLSSocket.html#bufferSize" 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-1024"></use></svg><span>buffer<wbr/>Size</span></a>
14
- <a href="_internal_.TLSSocket.html#bytesRead" 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>bytes<wbr/>Read</span></a>
15
- <a href="_internal_.TLSSocket.html#bytesWritten" 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>bytes<wbr/>Written</span></a>
16
- <a href="_internal_.TLSSocket.html#closed" 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>closed</span></a>
17
- <a href="_internal_.TLSSocket.html#connecting" 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>connecting</span></a>
18
- <a href="_internal_.TLSSocket.html#destroyed" 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>destroyed</span></a>
19
- <a href="_internal_.TLSSocket.html#encrypted" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>encrypted</span></a>
20
- <a href="_internal_.TLSSocket.html#errored" 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>errored</span></a>
21
- <a href="_internal_.TLSSocket.html#localAddress" 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>local<wbr/>Address?</span></a>
22
- <a href="_internal_.TLSSocket.html#localFamily" 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>local<wbr/>Family?</span></a>
23
- <a href="_internal_.TLSSocket.html#localPort" 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>local<wbr/>Port?</span></a>
24
- <a href="_internal_.TLSSocket.html#pending" 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>pending</span></a>
25
- <a href="_internal_.TLSSocket.html#readable" 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>readable</span></a>
26
- <a href="_internal_.TLSSocket.html#readableAborted" 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>readable<wbr/>Aborted</span></a>
27
- <a href="_internal_.TLSSocket.html#readableDidRead" 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>readable<wbr/>Did<wbr/>Read</span></a>
28
- <a href="_internal_.TLSSocket.html#readableEncoding" 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>readable<wbr/>Encoding</span></a>
29
- <a href="_internal_.TLSSocket.html#readableEnded" 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>readable<wbr/>Ended</span></a>
30
- <a href="_internal_.TLSSocket.html#readableFlowing" 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>readable<wbr/>Flowing</span></a>
31
- <a href="_internal_.TLSSocket.html#readableHighWaterMark" 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>readable<wbr/>High<wbr/>Water<wbr/>Mark</span></a>
32
- <a href="_internal_.TLSSocket.html#readableLength" 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>readable<wbr/>Length</span></a>
33
- <a href="_internal_.TLSSocket.html#readableObjectMode" 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>readable<wbr/>Object<wbr/>Mode</span></a>
34
- <a href="_internal_.TLSSocket.html#readyState" 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>ready<wbr/>State</span></a>
35
- <a href="_internal_.TLSSocket.html#remoteAddress" 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>remote<wbr/>Address?</span></a>
36
- <a href="_internal_.TLSSocket.html#remoteFamily" 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>remote<wbr/>Family?</span></a>
37
- <a href="_internal_.TLSSocket.html#remotePort" 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>remote<wbr/>Port?</span></a>
38
- <a href="_internal_.TLSSocket.html#timeout" 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>timeout?</span></a>
39
- <a href="_internal_.TLSSocket.html#writable" 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>writable</span></a>
40
- <a href="_internal_.TLSSocket.html#writableCorked" 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>writable<wbr/>Corked</span></a>
41
- <a href="_internal_.TLSSocket.html#writableEnded" 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>writable<wbr/>Ended</span></a>
42
- <a href="_internal_.TLSSocket.html#writableFinished" 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>writable<wbr/>Finished</span></a>
43
- <a href="_internal_.TLSSocket.html#writableHighWaterMark" 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>writable<wbr/>High<wbr/>Water<wbr/>Mark</span></a>
44
- <a href="_internal_.TLSSocket.html#writableLength" 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>writable<wbr/>Length</span></a>
45
- <a href="_internal_.TLSSocket.html#writableNeedDrain" 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>writable<wbr/>Need<wbr/>Drain</span></a>
46
- <a href="_internal_.TLSSocket.html#writableObjectMode" 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>writable<wbr/>Object<wbr/>Mode</span></a>
47
- <a href="_internal_.TLSSocket.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>
48
- <a href="_internal_.TLSSocket.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>
49
- <a href="_internal_.TLSSocket.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>
50
- <a href="_internal_.TLSSocket.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>
51
- </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="_internal_.TLSSocket.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>
52
- <a href="_internal_.TLSSocket.html#_asyncIterator_" 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/>Iterator]</span></a>
53
- <a href="_internal_.TLSSocket.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>
54
- <a href="_internal_.TLSSocket.html#_construct" 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>_construct?</span></a>
55
- <a href="_internal_.TLSSocket.html#_destroy" 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>_destroy</span></a>
56
- <a href="_internal_.TLSSocket.html#_final" 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>_final</span></a>
57
- <a href="_internal_.TLSSocket.html#_read" 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>_read</span></a>
58
- <a href="_internal_.TLSSocket.html#_write" 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>_write</span></a>
59
- <a href="_internal_.TLSSocket.html#_writev" 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>_writev?</span></a>
60
- <a href="_internal_.TLSSocket.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>
61
- <a href="_internal_.TLSSocket.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>
62
- <a href="_internal_.TLSSocket.html#asIndexedPairs" 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>as<wbr/>Indexed<wbr/>Pairs</span></a>
63
- <a href="_internal_.TLSSocket.html#compose" 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>compose</span></a>
64
- <a href="_internal_.TLSSocket.html#connect" 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>connect</span></a>
65
- <a href="_internal_.TLSSocket.html#cork" 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>cork</span></a>
66
- <a href="_internal_.TLSSocket.html#destroy" 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>destroy</span></a>
67
- <a href="_internal_.TLSSocket.html#destroySoon" 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>destroy<wbr/>Soon</span></a>
68
- <a href="_internal_.TLSSocket.html#disableRenegotiation" 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>disable<wbr/>Renegotiation</span></a>
69
- <a href="_internal_.TLSSocket.html#drop" 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>drop</span></a>
70
- <a href="_internal_.TLSSocket.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>
71
- <a href="_internal_.TLSSocket.html#enableTrace" 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>enable<wbr/>Trace</span></a>
72
- <a href="_internal_.TLSSocket.html#end" 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>end</span></a>
73
- <a href="_internal_.TLSSocket.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>
74
- <a href="_internal_.TLSSocket.html#every" 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>every</span></a>
75
- <a href="_internal_.TLSSocket.html#exportKeyingMaterial" 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>export<wbr/>Keying<wbr/>Material</span></a>
76
- <a href="_internal_.TLSSocket.html#filter" 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>filter</span></a>
77
- <a href="_internal_.TLSSocket.html#find" 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>find</span></a>
78
- <a href="_internal_.TLSSocket.html#flatMap" 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>flat<wbr/>Map</span></a>
79
- <a href="_internal_.TLSSocket.html#forEach" 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>for<wbr/>Each</span></a>
80
- <a href="_internal_.TLSSocket.html#getCertificate" 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/>Certificate</span></a>
81
- <a href="_internal_.TLSSocket.html#getCipher" 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/>Cipher</span></a>
82
- <a href="_internal_.TLSSocket.html#getEphemeralKeyInfo" 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/>Ephemeral<wbr/>Key<wbr/>Info</span></a>
83
- <a href="_internal_.TLSSocket.html#getFinished" 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/>Finished</span></a>
84
- <a href="_internal_.TLSSocket.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>
85
- <a href="_internal_.TLSSocket.html#getPeerCertificate" 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/>Peer<wbr/>Certificate</span></a>
86
- <a href="_internal_.TLSSocket.html#getPeerFinished" 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/>Peer<wbr/>Finished</span></a>
87
- <a href="_internal_.TLSSocket.html#getPeerX509Certificate" 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/>Peer<wbr/>X509<wbr/>Certificate</span></a>
88
- <a href="_internal_.TLSSocket.html#getProtocol" 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/>Protocol</span></a>
89
- <a href="_internal_.TLSSocket.html#getSession" 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/>Session</span></a>
90
- <a href="_internal_.TLSSocket.html#getSharedSigalgs" 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/>Shared<wbr/>Sigalgs</span></a>
91
- <a href="_internal_.TLSSocket.html#getTLSTicket" 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>getTLSTicket</span></a>
92
- <a href="_internal_.TLSSocket.html#getX509Certificate" 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/>X509<wbr/>Certificate</span></a>
93
- <a href="_internal_.TLSSocket.html#isPaused" 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>is<wbr/>Paused</span></a>
94
- <a href="_internal_.TLSSocket.html#isSessionReused" 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>is<wbr/>Session<wbr/>Reused</span></a>
95
- <a href="_internal_.TLSSocket.html#iterator" 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>iterator</span></a>
96
- <a href="_internal_.TLSSocket.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>
97
- <a href="_internal_.TLSSocket.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>
98
- <a href="_internal_.TLSSocket.html#map" 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>map</span></a>
99
- <a href="_internal_.TLSSocket.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>
100
- <a href="_internal_.TLSSocket.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>
101
- <a href="_internal_.TLSSocket.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>
102
- <a href="_internal_.TLSSocket.html#pause" 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>pause</span></a>
103
- <a href="_internal_.TLSSocket.html#pipe" 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>pipe</span></a>
104
- <a href="_internal_.TLSSocket.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>
105
- <a href="_internal_.TLSSocket.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>
106
- <a href="_internal_.TLSSocket.html#push" 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>push</span></a>
107
- <a href="_internal_.TLSSocket.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>
108
- <a href="_internal_.TLSSocket.html#read" 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>read</span></a>
109
- <a href="_internal_.TLSSocket.html#reduce" 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>reduce</span></a>
110
- <a href="_internal_.TLSSocket.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>
111
- <a href="_internal_.TLSSocket.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>
112
- <a href="_internal_.TLSSocket.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>
113
- <a href="_internal_.TLSSocket.html#renegotiate" 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>renegotiate</span></a>
114
- <a href="_internal_.TLSSocket.html#resetAndDestroy" 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>reset<wbr/>And<wbr/>Destroy</span></a>
115
- <a href="_internal_.TLSSocket.html#resume" 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>resume</span></a>
116
- <a href="_internal_.TLSSocket.html#setDefaultEncoding" 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/>Default<wbr/>Encoding</span></a>
117
- <a href="_internal_.TLSSocket.html#setEncoding" 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/>Encoding</span></a>
118
- <a href="_internal_.TLSSocket.html#setKeepAlive" 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/>Keep<wbr/>Alive</span></a>
119
- <a href="_internal_.TLSSocket.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>
120
- <a href="_internal_.TLSSocket.html#setMaxSendFragment" 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/>Max<wbr/>Send<wbr/>Fragment</span></a>
121
- <a href="_internal_.TLSSocket.html#setNoDelay" 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/>No<wbr/>Delay</span></a>
122
- <a href="_internal_.TLSSocket.html#setTimeout" 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/>Timeout</span></a>
123
- <a href="_internal_.TLSSocket.html#some" 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>some</span></a>
124
- <a href="_internal_.TLSSocket.html#take" 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>take</span></a>
125
- <a href="_internal_.TLSSocket.html#toArray" 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>to<wbr/>Array</span></a>
126
- <a href="_internal_.TLSSocket.html#uncork" 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>uncork</span></a>
127
- <a href="_internal_.TLSSocket.html#unpipe" 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>unpipe</span></a>
128
- <a href="_internal_.TLSSocket.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>
129
- <a href="_internal_.TLSSocket.html#unshift" 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>unshift</span></a>
130
- <a href="_internal_.TLSSocket.html#wrap" 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>wrap</span></a>
131
- <a href="_internal_.TLSSocket.html#write" 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>write</span></a>
132
- <a href="_internal_.TLSSocket.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>
133
- <a href="_internal_.TLSSocket.html#from" 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>from</span></a>
134
- <a href="_internal_.TLSSocket.html#fromWeb" 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>from<wbr/>Web</span></a>
135
- <a href="_internal_.TLSSocket.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>
136
- <a href="_internal_.TLSSocket.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>
137
- <a href="_internal_.TLSSocket.html#isDisturbed" 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>is<wbr/>Disturbed</span></a>
138
- <a href="_internal_.TLSSocket.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>
139
- <a href="_internal_.TLSSocket.html#on-6" 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>
140
- <a href="_internal_.TLSSocket.html#once-6" 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>
141
- <a href="_internal_.TLSSocket.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>
142
- <a href="_internal_.TLSSocket.html#toWeb" 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>to<wbr/>Web</span></a>
143
- </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_TLSSocket" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new TLSSocket</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">socket</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="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a><a href="#constructor.new_TLSSocket" 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>Construct a new tls.TLSSocket object from an existing TCP socket.</p>
144
- </div><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_.Duplex.html" class="tsd-signature-type tsd-kind-class">Duplex</a><span class="tsd-signature-symbol"> | </span><a href="_internal_.Socket.html" class="tsd-signature-type tsd-kind-class">Socket</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.TLSSocketOptions.html" class="tsd-signature-type tsd-kind-interface">TLSSocketOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.TLSSocket.html" class="tsd-signature-type tsd-kind-class">TLSSocket</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#constructor">constructor</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:223</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="allowHalfOpen" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>allow<wbr/>Half<wbr/>Open</span><a href="#allowHalfOpen" 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">allow<wbr/>Half<wbr/>Open</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>If <code>false</code> then the stream will automatically end the writable side when the
145
- readable side ends. Set initially by the <code>allowHalfOpen</code> constructor option,
146
- which defaults to <code>true</code>.</p>
147
- <p>This can be changed manually to change the half-open behavior of an existing
148
- <code>Duplex</code> stream instance, but must be changed before the <code>&#39;end&#39;</code> event is emitted.</p>
149
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.4</p>
150
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#allowHalfOpen">allowHalfOpen</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1076</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="alpnProtocol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>alpn<wbr/>Protocol</span><a href="#alpnProtocol" 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">alpn<wbr/>Protocol</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><span class="tsd-signature-type">false</span></div><div class="tsd-comment tsd-typography"><p>String containing the selected ALPN protocol.
151
- Before a handshake has completed, this value is always null.
152
- When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.</p>
153
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:246</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="authorizationError" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>authorization<wbr/>Error</span><a href="#authorizationError" 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">authorization<wbr/>Error</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></div><div class="tsd-comment tsd-typography"><p>Returns the reason why the peer&#39;s certificate was not been verified. This
154
- property is set only when <code>tlsSocket.authorized === false</code>.</p>
155
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.4</p>
156
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:235</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="authorized" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>authorized</span><a href="#authorized" 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">authorized</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>This property is <code>true</code> if the peer certificate was signed by one of the CAs
157
- specified when creating the <code>tls.TLSSocket</code> instance, otherwise <code>false</code>.</p>
158
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.4</p>
159
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:229</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="autoSelectFamilyAttemptedAddresses" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>auto<wbr/>Select<wbr/>Family<wbr/>Attempted<wbr/>Addresses</span><a href="#autoSelectFamilyAttemptedAddresses" 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">auto<wbr/>Select<wbr/>Family<wbr/>Attempted<wbr/>Addresses</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><div class="tsd-comment tsd-typography"><p>This property is only present if the family autoselection algorithm is enabled in <code>socket.connect(options)</code>
160
- and it is an array of the addresses that have been attempted.</p>
161
- <p>Each address is a string in the form of <code>$IP:$PORT</code>.
162
- If the connection was successful, then the last address is the one that the socket is currently connected to.</p>
163
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v19.4.0</p>
164
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#autoSelectFamilyAttemptedAddresses">autoSelectFamilyAttemptedAddresses</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:251</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="bufferSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="deprecated">buffer<wbr/>Size</span><a href="#bufferSize" 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">buffer<wbr/>Size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>This property shows the number of characters buffered for writing. The buffer
165
- may contain strings whose length after encoding is not yet known. So this number
166
- is only an approximation of the number of bytes in the buffer.</p>
167
- <p><code>net.Socket</code> has the property that <code>socket.write()</code> always works. This is to
168
- help users get up and running quickly. The computer cannot always keep up
169
- with the amount of data that is written to a socket. The network connection
170
- simply might be too slow. Node.js will internally queue up the data written to a
171
- socket and send it out over the wire when it is possible.</p>
172
- <p>The consequence of this internal buffering is that memory may grow.
173
- Users who experience large or growing <code>bufferSize</code> should attempt to
174
- &quot;throttle&quot; the data flows in their program with <code>socket.pause()</code> and <code>socket.resume()</code>.</p>
175
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.3.8</p>
176
- <h4>Deprecated</h4><p>Since v14.6.0 - Use <code>writableLength</code> instead.</p>
177
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#bufferSize">bufferSize</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:269</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="bytesRead" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>bytes<wbr/>Read</span><a href="#bytesRead" 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">bytes<wbr/>Read</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The amount of received bytes.</p>
178
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.3</p>
179
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#bytesRead">bytesRead</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:274</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="bytesWritten" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>bytes<wbr/>Written</span><a href="#bytesWritten" 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">bytes<wbr/>Written</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The amount of bytes sent.</p>
180
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.3</p>
181
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#bytesWritten">bytesWritten</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:279</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="closed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>closed</span><a href="#closed" 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">closed</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Is <code>true</code> after <code>&#39;close&#39;</code> has been emitted.</p>
182
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v18.0.0</p>
183
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#closed">closed</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1065</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="connecting" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>connecting</span><a href="#connecting" 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">connecting</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>If <code>true</code>, <code>socket.connect(options[, connectListener])</code> was
184
- called and has not yet finished. It will stay <code>true</code> until the socket becomes
185
- connected, then it is set to <code>false</code> and the <code>&#39;connect&#39;</code> event is emitted. Note
186
- that the <code>socket.connect(options[, connectListener])</code> callback is a listener for the <code>&#39;connect&#39;</code> event.</p>
187
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v6.1.0</p>
188
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#connecting">connecting</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:287</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="destroyed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>destroyed</span><a href="#destroyed" 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">destroyed</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>See <code>writable.destroyed</code> for further details.</p>
189
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#destroyed">destroyed</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:297</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="encrypted" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>encrypted</span><a href="#encrypted" 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">encrypted</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">true</span></div><div class="tsd-comment tsd-typography"><p>Always returns <code>true</code>. This may be used to distinguish TLS sockets from regular<code>net.Socket</code> instances.</p>
190
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.4</p>
191
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:240</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="errored" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>errored</span><a href="#errored" 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">errored</span><span class="tsd-signature-symbol">:</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></div><div class="tsd-comment tsd-typography"><p>Returns error if the stream has been destroyed with an error.</p>
192
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v18.0.0</p>
193
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#errored">errored</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1066</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="localAddress" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>local<wbr/>Address</span><a href="#localAddress" 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">local<wbr/>Address</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>The string representation of the local IP address the remote client is
194
- connecting on. For example, in a server listening on <code>&#39;0.0.0.0&#39;</code>, if a client
195
- connects on <code>&#39;192.168.1.1&#39;</code>, the value of <code>socket.localAddress</code> would be<code>&#39;192.168.1.1&#39;</code>.</p>
196
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.6</p>
197
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#localAddress">localAddress</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:304</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="localFamily" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>local<wbr/>Family</span><a href="#localFamily" 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">local<wbr/>Family</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>The string representation of the local IP family. <code>&#39;IPv4&#39;</code> or <code>&#39;IPv6&#39;</code>.</p>
198
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v18.8.0, v16.18.0</p>
199
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#localFamily">localFamily</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:314</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="localPort" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>local<wbr/>Port</span><a href="#localPort" 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">local<wbr/>Port</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The numeric representation of the local port. For example, <code>80</code> or <code>21</code>.</p>
200
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.6</p>
201
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#localPort">localPort</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:309</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="pending" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>pending</span><a href="#pending" 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">pending</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>This is <code>true</code> if the socket is not connected yet, either because <code>.connect()</code>has not yet been called or because it is still in the process of connecting
202
- (see <code>socket.connecting</code>).</p>
203
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v11.2.0, v10.16.0</p>
204
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#pending">pending</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:293</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readable" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readable</span><a href="#readable" 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">readable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Is <code>true</code> if it is safe to call <a href="_internal_.ReadableBase.html#read" class="tsd-kind-method">read</a>, which means
205
- the stream has not been destroyed or emitted <code>&#39;error&#39;</code> or <code>&#39;end&#39;</code>.</p>
206
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v11.4.0</p>
207
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#readable">readable</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:77</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableAborted" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <code class="tsd-tag ts-flagExperimental">Experimental</code> <span>readable<wbr/>Aborted</span><a href="#readableAborted" 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">readable<wbr/>Aborted</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Returns whether the stream was destroyed or errored before emitting <code>&#39;end&#39;</code>.</p>
208
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v16.8.0</p>
209
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#readableAborted">readableAborted</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:71</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableDidRead" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <code class="tsd-tag ts-flagExperimental">Experimental</code> <span>readable<wbr/>Did<wbr/>Read</span><a href="#readableDidRead" 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">readable<wbr/>Did<wbr/>Read</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Returns whether <code>&#39;data&#39;</code> has been emitted.</p>
210
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v16.7.0, v14.18.0</p>
211
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#readableDidRead">readableDidRead</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:83</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableEncoding" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>Encoding</span><a href="#readableEncoding" 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">readable<wbr/>Encoding</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></div><div class="tsd-comment tsd-typography"><p>Getter for the property <code>encoding</code> of a given <code>Readable</code> stream. The <code>encoding</code> property can be set using the <a href="_internal_.ReadableBase.html#setEncoding" class="tsd-kind-method">setEncoding</a> method.</p>
212
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.7.0</p>
213
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#readableEncoding">readableEncoding</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:88</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableEnded" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>Ended</span><a href="#readableEnded" 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">readable<wbr/>Ended</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Becomes <code>true</code> when <a href="https://nodejs.org/docs/latest-v20.x/api/stream.html#event-end"><code>&#39;end&#39;</code></a> event is emitted.</p>
214
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.9.0</p>
215
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#readableEnded">readableEnded</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:93</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableFlowing" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>Flowing</span><a href="#readableFlowing" 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">readable<wbr/>Flowing</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">boolean</span></div><div class="tsd-comment tsd-typography"><p>This property reflects the current state of a <code>Readable</code> stream as described
216
- in the <a href="https://nodejs.org/docs/latest-v20.x/api/stream.html#three-states">Three states</a> section.</p>
217
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v9.4.0</p>
218
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#readableFlowing">readableFlowing</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:99</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableHighWaterMark" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>High<wbr/>Water<wbr/>Mark</span><a href="#readableHighWaterMark" 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">readable<wbr/>High<wbr/>Water<wbr/>Mark</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Returns the value of <code>highWaterMark</code> passed when creating this <code>Readable</code>.</p>
219
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v9.3.0</p>
220
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#readableHighWaterMark">readableHighWaterMark</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:104</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>Length</span><a href="#readableLength" 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">readable<wbr/>Length</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>This property contains the number of bytes (or objects) in the queue
221
- ready to be read. The value provides introspection data regarding
222
- the status of the <code>highWaterMark</code>.</p>
223
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v9.4.0</p>
224
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#readableLength">readableLength</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:111</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableObjectMode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>Object<wbr/>Mode</span><a href="#readableObjectMode" 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">readable<wbr/>Object<wbr/>Mode</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Getter for the property <code>objectMode</code> of a given <code>Readable</code> stream.</p>
225
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.3.0</p>
226
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#readableObjectMode">readableObjectMode</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:116</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readyState" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>ready<wbr/>State</span><a href="#readyState" 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">ready<wbr/>State</span><span class="tsd-signature-symbol">:</span> <a href="../types/_internal_.SocketReadyState.html" class="tsd-signature-type tsd-kind-type-alias">SocketReadyState</a></div><div class="tsd-comment tsd-typography"><p>This property represents the state of the connection as a string.</p>
227
- <ul>
228
- <li>If the stream is connecting <code>socket.readyState</code> is <code>opening</code>.</li>
229
- <li>If the stream is readable and writable, it is <code>open</code>.</li>
230
- <li>If the stream is readable and not writable, it is <code>readOnly</code>.</li>
231
- <li>If the stream is not readable and writable, it is <code>writeOnly</code>.</li>
232
- </ul>
233
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.0</p>
234
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#readyState">readyState</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:324</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="remoteAddress" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>remote<wbr/>Address</span><a href="#remoteAddress" 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">remote<wbr/>Address</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>The string representation of the remote IP address. For example,<code>&#39;74.125.127.100&#39;</code> or <code>&#39;2001:4860:a005::68&#39;</code>. Value may be <code>undefined</code> if
235
- the socket is destroyed (for example, if the client disconnected).</p>
236
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.10</p>
237
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#remoteAddress">remoteAddress</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:330</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="remoteFamily" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>remote<wbr/>Family</span><a href="#remoteFamily" 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">remote<wbr/>Family</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>The string representation of the remote IP family. <code>&#39;IPv4&#39;</code> or <code>&#39;IPv6&#39;</code>. Value may be <code>undefined</code> if
238
- the socket is destroyed (for example, if the client disconnected).</p>
239
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.14</p>
240
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#remoteFamily">remoteFamily</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:336</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="remotePort" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>remote<wbr/>Port</span><a href="#remotePort" 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">remote<wbr/>Port</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The numeric representation of the remote port. For example, <code>80</code> or <code>21</code>. Value may be <code>undefined</code> if
241
- the socket is destroyed (for example, if the client disconnected).</p>
242
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.10</p>
243
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#remotePort">remotePort</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:342</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="timeout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>timeout</span><a href="#timeout" 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">timeout</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The socket timeout in milliseconds as set by <code>socket.setTimeout()</code>.
244
- It is <code>undefined</code> if a timeout has not been set.</p>
245
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v10.7.0</p>
246
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#timeout">timeout</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:348</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="writable" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>writable</span><a href="#writable" 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">writable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Is <code>true</code> if it is safe to call <code>writable.write()</code>, which means
247
- the stream has not been destroyed, errored, or ended.</p>
248
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v11.4.0</p>
249
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#writable">writable</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1057</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="writableCorked" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>writable<wbr/>Corked</span><a href="#writableCorked" 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">writable<wbr/>Corked</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Number of times <code>writable.uncork()</code> needs to be
250
- called in order to fully uncork the stream.</p>
251
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.2.0, v12.16.0</p>
252
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#writableCorked">writableCorked</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1063</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="writableEnded" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>writable<wbr/>Ended</span><a href="#writableEnded" 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">writable<wbr/>Ended</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Is <code>true</code> after <code>writable.end()</code> has been called. This property
253
- does not indicate whether the data has been flushed, for this use <code>writable.writableFinished</code> instead.</p>
254
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.9.0</p>
255
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#writableEnded">writableEnded</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1058</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="writableFinished" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>writable<wbr/>Finished</span><a href="#writableFinished" 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">writable<wbr/>Finished</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Is set to <code>true</code> immediately before the <code>&#39;finish&#39;</code> event is emitted.</p>
256
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.6.0</p>
257
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#writableFinished">writableFinished</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1059</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="writableHighWaterMark" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>writable<wbr/>High<wbr/>Water<wbr/>Mark</span><a href="#writableHighWaterMark" 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">writable<wbr/>High<wbr/>Water<wbr/>Mark</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Return the value of <code>highWaterMark</code> passed when creating this <code>Writable</code>.</p>
258
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v9.3.0</p>
259
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#writableHighWaterMark">writableHighWaterMark</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1060</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="writableLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>writable<wbr/>Length</span><a href="#writableLength" 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">writable<wbr/>Length</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>This property contains the number of bytes (or objects) in the queue
260
- ready to be written. The value provides introspection data regarding
261
- the status of the <code>highWaterMark</code>.</p>
262
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v9.4.0</p>
263
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#writableLength">writableLength</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1061</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="writableNeedDrain" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>writable<wbr/>Need<wbr/>Drain</span><a href="#writableNeedDrain" 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">writable<wbr/>Need<wbr/>Drain</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Is <code>true</code> if the stream&#39;s buffer has been full and stream will emit <code>&#39;drain&#39;</code>.</p>
264
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v15.2.0, v14.17.0</p>
265
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#writableNeedDrain">writableNeedDrain</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1064</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="writableObjectMode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>writable<wbr/>Object<wbr/>Mode</span><a href="#writableObjectMode" 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">writable<wbr/>Object<wbr/>Mode</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Getter for the property <code>objectMode</code> of a given <code>Writable</code> stream.</p>
266
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.3.0</p>
267
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#writableObjectMode">writableObjectMode</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1062</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>
268
- <p>See how to write a custom <code>rejection handler</code>.</p>
269
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.4.0, v12.16.0</p>
270
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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>
271
- <p>Change the default <code>captureRejections</code> option on all new <code>EventEmitter</code> objects.</p>
272
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.4.0, v12.16.0</p>
273
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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
274
- event. This limit can be changed for individual <code>EventEmitter</code> instances
275
- using the <code>emitter.setMaxListeners(n)</code> method. To change the default
276
- for <em>all</em><code>EventEmitter</code> instances, the <code>events.defaultMaxListeners</code> property
277
- can be used. If this value is not a positive number, a <code>RangeError</code> is thrown.</p>
278
- <p>Take caution when setting the <code>events.defaultMaxListeners</code> because the
279
- change affects <em>all</em> <code>EventEmitter</code> instances, including those created before
280
- the change is made. However, calling <code>emitter.setMaxListeners(n)</code> still has
281
- precedence over <code>events.defaultMaxListeners</code>.</p>
282
- <p>This is not a hard limit. The <code>EventEmitter</code> instance will allow
283
- more listeners to be added but will output a trace warning to stderr indicating
284
- that a &quot;possible EventEmitter memory leak&quot; has been detected. For any single
285
- <code>EventEmitter</code>, the <code>emitter.getMaxListeners()</code> and <code>emitter.setMaxListeners()</code> methods can be used to
286
- temporarily avoid this warning:</p>
287
- <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>
288
- </code><button>Copy</button></pre>
289
- <p>The <code>--trace-warnings</code> command-line flag can be used to display the
290
- stack trace for such warnings.</p>
291
- <p>The emitted warning can be inspected with <code>process.on(&#39;warning&#39;)</code> and will
292
- have the additional <code>emitter</code>, <code>type</code>, and <code>count</code> properties, referring to
293
- the event emitter instance, the event&#39;s name and the number of attached
294
- listeners, respectively.
295
- Its <code>name</code> property is set to <code>&#39;MaxListenersExceededWarning&#39;</code>.</p>
296
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.2</p>
297
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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>
298
- <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
299
- regular <code>&#39;error&#39;</code> listener is installed.</p>
300
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.6.0, v12.17.0</p>
301
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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 <code>readable.destroy()</code> with an <code>AbortError</code> and returns a promise that fulfills when the stream is finished.</p>
302
- </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.4.0</p>
303
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#_asyncDispose_">[asyncDispose]</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:659</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_asyncIterator_" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[async<wbr/>Iterator]</span><a href="#_asyncIterator_" 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="_asyncIterator_._asyncIterator_-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">[async<wbr/>Iterator]</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="#_asyncIterator_._asyncIterator_-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"><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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#_asyncIterator_">[asyncIterator]</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:654</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_.TLSSocket.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_.Socket.html">Socket</a>.<a href="_internal_.Socket.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-inherited tsd-is-external"><a id="_construct" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>_construct</span><a href="#_construct" 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="_construct._construct-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_construct</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-type">void</span><a href="#_construct._construct-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">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</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-kind-parameter">error</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">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></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><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#_construct">_construct</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:133</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_destroy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_destroy</span><a href="#_destroy" 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="_destroy._destroy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_destroy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</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><a href="#_destroy._destroy-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">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">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</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-kind-parameter">error</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">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></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><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#_destroy">_destroy</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1119</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_final" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_final</span><a href="#_final" 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="_final._final-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_final</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-type">void</span><a href="#_final._final-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">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</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-kind-parameter">error</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">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></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><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#_final">_final</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1120</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_read" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_read</span><a href="#_read" 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="_read._read-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_read</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_read._read-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">size</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><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#_read">_read</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:134</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_write" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_write</span><a href="#_write" 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="_write._write-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_write</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunk</span>, <span class="tsd-kind-parameter">encoding</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><a href="#_write._write-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">chunk</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</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">error</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-kind-parameter">error</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">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></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><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#_write">_write</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1111</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_writev" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>_writev</span><a href="#_writev" 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="_writev._writev-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_writev</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunks</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><a href="#_writev._writev-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">chunks</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">chunk</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-kind-property">encoding</span><span class="tsd-signature-symbol">: </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span></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">error</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-kind-parameter">error</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">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></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><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#_writev">_writev</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1112</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>
304
- <ol>
305
- <li>close</li>
306
- <li>connect</li>
307
- <li>connectionAttempt</li>
308
- <li>connectionAttemptFailed</li>
309
- <li>connectionAttemptTimeout</li>
310
- <li>data</li>
311
- <li>drain</li>
312
- <li>end</li>
313
- <li>error</li>
314
- <li>lookup</li>
315
- <li>ready</li>
316
- <li>timeout</li>
317
- </ol>
318
- </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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:474</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;OCSPResponse&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">response</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">response</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">response</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">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:475</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;secureConnect&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-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>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:476</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;session&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">session</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">session</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">session</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">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:477</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;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-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-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></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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:478</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-symbol">{}</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
319
- socket as reported by the operating system:<code>{ port: 12346, family: &#39;IPv4&#39;, address: &#39;127.0.0.1&#39; }</code></p>
320
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{}</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>
321
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#address">address</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:228</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="asIndexedPairs" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>as<wbr/>Indexed<wbr/>Pairs</span><a href="#asIndexedPairs" 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="asIndexedPairs.asIndexedPairs-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">as<wbr/>Indexed<wbr/>Pairs</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-symbol">: </span><a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#asIndexedPairs.asIndexedPairs-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>This method returns a new stream with chunks of the underlying stream paired with a counter
322
- in the form <code>[index, chunk]</code>. The first index value is <code>0</code> and it increases by 1 for each chunk produced.</p>
323
- </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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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 <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream of indexed pairs.</p>
324
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
325
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#asIndexedPairs">asIndexedPairs</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:549</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="compose" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>compose</span><a href="#compose" 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="compose.compose-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compose</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.TLSSocket.html#compose.compose-1.T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">stream</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 class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#compose.compose-1.T">T</a><a href="#compose.compose-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="compose.compose-1.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><a href="../interfaces/_internal_.ReadableStream-1.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a></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">stream</span>: <a href="../types/_internal_.ComposeFnParam.html" class="tsd-signature-type tsd-kind-type-alias">ComposeFnParam</a><span class="tsd-signature-symbol"> | </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#compose.compose-1.T">T</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Iterable.html" class="tsd-signature-type tsd-kind-interface">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#compose.compose-1.T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.AsyncIterable.html" class="tsd-signature-type tsd-kind-interface">AsyncIterable</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#compose.compose-1.T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">signal</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AbortSignal</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">signal</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AbortSignal</span></h5></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#compose.compose-1.T">T</a></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#compose">compose</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:36</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="connect" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>connect</span><a href="#connect" 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="connect.connect-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">connect</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span>, <span class="tsd-kind-parameter">connectionListener</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="#connect.connect-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>Initiate a connection on a given socket.</p>
326
- <p>Possible signatures:</p>
327
- <ul>
328
- <li><code>socket.connect(options[, connectListener])</code></li>
329
- <li><code>socket.connect(path[, connectListener])</code> for <code>IPC</code> connections.</li>
330
- <li><code>socket.connect(port[, host][, connectListener])</code> for TCP connections.</li>
331
- <li>Returns: <code>net.Socket</code> The socket itself.</li>
332
- </ul>
333
- <p>This function is asynchronous. When the connection is established, the <code>&#39;connect&#39;</code> event will be emitted. If there is a problem connecting,
334
- instead of a <code>&#39;connect&#39;</code> event, an <code>&#39;error&#39;</code> event will be emitted with
335
- the error passed to the <code>&#39;error&#39;</code> listener.
336
- The last parameter <code>connectListener</code>, if supplied, will be added as a listener
337
- for the <code>&#39;connect&#39;</code> event <strong>once</strong>.</p>
338
- <p>This function should only be used for reconnecting a socket after<code>&#39;close&#39;</code> has been emitted or otherwise it may lead to undefined
339
- behavior.</p>
340
- </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="../types/_internal_.SocketConnectOpts.html" class="tsd-signature-type tsd-kind-type-alias">SocketConnectOpts</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">connectionListener</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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#connect">connect</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:136</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="connect.connect-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">connect</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">port</span>, <span class="tsd-kind-parameter">host</span>, <span class="tsd-kind-parameter">connectionListener</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="#connect.connect-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">port</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">host</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">connectionListener</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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#connect">connect</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:137</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="connect.connect-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">connect</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">port</span>, <span class="tsd-kind-parameter">connectionListener</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="#connect.connect-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">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">connectionListener</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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#connect">connect</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:138</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="connect.connect-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">connect</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">path</span>, <span class="tsd-kind-parameter">connectionListener</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="#connect.connect-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">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">connectionListener</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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#connect">connect</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:139</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="cork" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>cork</span><a href="#cork" 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="cork.cork-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">cork</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><a href="#cork.cork-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>writable.cork()</code> method forces all written data to be buffered in memory.
341
- The buffered data will be flushed when either the <a href="_internal_.WritableBase.html#uncork" class="tsd-kind-method">uncork</a> or <a href="_internal_.WritableBase.html#end" class="tsd-kind-method">end</a> methods are called.</p>
342
- <p>The primary intent of <code>writable.cork()</code> is to accommodate a situation in which
343
- several small chunks are written to the stream in rapid succession. Instead of
344
- immediately forwarding them to the underlying destination, <code>writable.cork()</code> buffers all the chunks until <code>writable.uncork()</code> is called, which will pass them
345
- all to <code>writable._writev()</code>, if present. This prevents a head-of-line blocking
346
- situation where data is being buffered while waiting for the first small chunk
347
- to be processed. However, use of <code>writable.cork()</code> without implementing <code>writable._writev()</code> may have an adverse effect on throughput.</p>
348
- <p>See also: <code>writable.uncork()</code>, <code>writable._writev()</code>.</p>
349
- </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.11.2</p>
350
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#cork">cork</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1127</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="destroy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>destroy</span><a href="#destroy" 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="destroy.destroy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">destroy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</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="#destroy.destroy-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>Destroy the stream. Optionally emit an <code>&#39;error&#39;</code> event, and emit a <code>&#39;close&#39;</code> event (unless <code>emitClose</code> is set to <code>false</code>). After this call, the readable
351
- stream will release any internal resources and subsequent calls to <code>push()</code> will be ignored.</p>
352
- <p>Once <code>destroy()</code> has been called any further calls will be a no-op and no
353
- further errors except from <code>_destroy()</code> may be emitted as <code>&#39;error&#39;</code>.</p>
354
- <p>Implementors should not override this method, but instead implement <code>readable._destroy()</code>.</p>
355
- </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">error</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span><div class="tsd-comment tsd-typography"><p>Error which will be passed as payload in <code>&#39;error&#39;</code> event</p>
356
- </div><div class="tsd-comment tsd-typography"></div></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>v8.0.0</p>
357
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#destroy">destroy</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:586</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="destroySoon" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>destroy<wbr/>Soon</span><a href="#destroySoon" 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="destroySoon.destroySoon-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">destroy<wbr/>Soon</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><a href="#destroySoon.destroySoon-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>Destroys the socket after all data is written. If the <code>finish</code> event was already emitted the socket is destroyed immediately.
358
- If the socket is still writable it implicitly calls <code>socket.end()</code>.</p>
359
- </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.3.4</p>
360
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#destroySoon">destroySoon</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:99</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="disableRenegotiation" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>disable<wbr/>Renegotiation</span><a href="#disableRenegotiation" 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="disableRenegotiation.disableRenegotiation-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">disable<wbr/>Renegotiation</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><a href="#disableRenegotiation.disableRenegotiation-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>Disables TLS renegotiation for this <code>TLSSocket</code> instance. Once called, attempts
361
- to renegotiate will trigger an <code>&#39;error&#39;</code> event on the <code>TLSSocket</code>.</p>
362
- </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>v8.4.0</p>
363
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:420</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="drop" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>drop</span><a href="#drop" 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="drop.drop-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">drop</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">limit</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="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#drop.drop-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>This method returns a new stream with the first <em>limit</em> chunks dropped from the start.</p>
364
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">limit</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>the number of chunks to drop from the readable.</p>
365
- </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="../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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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 <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream with <em>limit</em> chunks dropped from the start.</p>
366
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
367
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#drop">drop</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:535</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
368
- to each.</p>
369
- <p>Returns <code>true</code> if the event had listeners, <code>false</code> otherwise.</p>
370
- <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>
371
- </code><button>Copy</button></pre>
372
- </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>
373
- </div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:479</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">response</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;OCSPResponse&quot;</span></span></li><li><span><span class="tsd-kind-parameter">response</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">boolean</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:480</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-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;secureConnect&quot;</span></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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:481</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">session</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;session&quot;</span></span></li><li><span><span class="tsd-kind-parameter">session</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">boolean</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:482</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">line</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;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></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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:483</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="enableTrace" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>enable<wbr/>Trace</span><a href="#enableTrace" 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="enableTrace.enableTrace-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">enable<wbr/>Trace</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><a href="#enableTrace.enableTrace-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>When enabled, TLS packet trace information is written to <code>stderr</code>. This can be
374
- used to debug TLS connection problems.</p>
375
- <p>The format of the output is identical to the output of<code>openssl s_client -trace</code> or <code>openssl s_server -trace</code>. While it is produced by
376
- OpenSSL&#39;s <code>SSL_trace()</code> function, the format is undocumented, can change
377
- without notice, and should not be relied on.</p>
378
- </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>v12.2.0</p>
379
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:430</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="end" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>end</span><a href="#end" 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="end.end-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">end</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="#end.end-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>Half-closes the socket. i.e., it sends a FIN packet. It is possible the
380
- server will still send some data.</p>
381
- <p>See <code>writable.end()</code> for further details.</p>
382
- </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-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>Optional callback for when the socket is finished.</p>
383
- </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-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><p>The socket itself.</p>
384
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.90</p>
385
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#end">end</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:359</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="end.end-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">end</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">buffer</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="#end.end-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">buffer</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Uint8Array</span></span></li><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-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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#end">end</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:360</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="end.end-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">end</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">str</span>, <span class="tsd-kind-parameter">encoding</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="#end.end-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">str</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Uint8Array</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span></li><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-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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#end">end</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:361</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
386
- listeners. The values in the array are strings or <code>Symbol</code>s.</p>
387
- <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>
388
- </code><button>Copy</button></pre>
389
- </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>
390
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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="every" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>every</span><a href="#every" 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="every.every-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">every</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</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">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#every.every-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>This method is similar to <code>Array.prototype.every</code> and calls <em>fn</em> on each chunk in the stream
391
- to check if all awaited return values are truthy value for <em>fn</em>. Once an <em>fn</em> call on a chunk
392
- <code>await</code>ed return value is falsy, the stream is destroyed and the promise is fulfilled with <code>false</code>.
393
- If all of the <em>fn</em> calls on the chunks return a truthy value, the promise is fulfilled with <code>true</code>.</p>
394
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</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"> =&gt; </span><span class="tsd-signature-type">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to call on each chunk of the stream. Async or not.</p>
395
- </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">data</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">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</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">data</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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p>a promise evaluating to <code>true</code> if <em>fn</em> returned a truthy value for every one of the chunks.</p>
396
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
397
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#every">every</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:514</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="exportKeyingMaterial" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>export<wbr/>Keying<wbr/>Material</span><a href="#exportKeyingMaterial" 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="exportKeyingMaterial.exportKeyingMaterial-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">export<wbr/>Keying<wbr/>Material</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">length</span>, <span class="tsd-kind-parameter">label</span>, <span class="tsd-kind-parameter">context</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="#exportKeyingMaterial.exportKeyingMaterial-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>Keying material is used for validations to prevent different kind of attacks in
398
- network protocols, for example in the specifications of IEEE 802.1X.</p>
399
- <p>Example</p>
400
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">keyingMaterial</span><span class="hl-1"> = </span><span class="hl-7">tlsSocket</span><span class="hl-1">.</span><span class="hl-0">exportKeyingMaterial</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-9">128</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;client finished&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-5">/*</span><br/><span class="hl-5"> Example return value of keyingMaterial:</span><br/><span class="hl-5"> &lt;Buffer 76 26 af 99 c5 56 8e 42 09 91 ef 9f 93 cb ad 6c 7b 65 f8 53 f1 d8 d9</span><br/><span class="hl-5"> 12 5a 33 b8 b5 25 df 7b 37 9f e0 e2 4f b8 67 83 a3 2f cd 5d 41 42 4c 91</span><br/><span class="hl-5"> 74 ef 2c ... 78 more bytes&gt;</span><br/>
401
- </code><button>Copy</button></pre>
402
- <p>See the OpenSSL <a href="https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html"><code>SSL_export_keying_material</code></a> documentation for more
403
- information.</p>
404
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">length</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>number of bytes to retrieve from keying material</p>
405
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">label</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>an application specific label, typically this will be a value from the <a href="https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels">IANA Exporter Label
406
- Registry</a>.</p>
407
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">context</span>: <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span><div class="tsd-comment tsd-typography"><p>Optionally provide a context.</p>
408
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><p>requested bytes of the keying material</p>
409
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.10.0, v12.17.0</p>
410
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:473</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="filter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>filter</span><a href="#filter" 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="filter.filter-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">filter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</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="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#filter.filter-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>This method allows filtering the stream. For each chunk in the stream the <em>fn</em> function will be called
411
- and if it returns a truthy value, the chunk will be passed to the result stream.
412
- If the <em>fn</em> function returns a promise - that promise will be <code>await</code>ed.</p>
413
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</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"> =&gt; </span><span class="tsd-signature-type">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to filter chunks from the stream. Async or not.</p>
414
- </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">data</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">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</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">data</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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream filtered with the predicate <em>fn</em>.</p>
415
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.4.0, v16.14.0</p>
416
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#filter">filter</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:442</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="find" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>find</span><a href="#find" 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="find.find-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">find</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.TLSSocket.html#find.find-1.T-1">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</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">undefined</span><span class="tsd-signature-symbol"> | </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#find.find-1.T-1">T</a><span class="tsd-signature-symbol">&gt;</span><a href="#find.find-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>This method is similar to <code>Array.prototype.find</code> and calls <em>fn</em> on each chunk in the stream
417
- to find a chunk with a truthy value for <em>fn</em>. Once an <em>fn</em> call&#39;s awaited return value is truthy,
418
- the stream is destroyed and the promise is fulfilled with value for which <em>fn</em> returned a truthy value.
419
- If all of the <em>fn</em> calls on the chunks return a falsy value, the promise is fulfilled with <code>undefined</code>.</p>
420
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="find.find-1.T-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</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">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</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"> =&gt; </span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-keyword"> is </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#find.find-1.T-1">T</a><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to call on each chunk of the stream. Async or not.</p>
421
- </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">data</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-kind-parameter">data</span><span class="tsd-signature-keyword"> is </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#find.find-1.T-1">T</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">data</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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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-kind-parameter">data</span><span class="tsd-signature-keyword"> is </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#find.find-1.T-1">T</a></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">undefined</span><span class="tsd-signature-symbol"> | </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#find.find-1.T-1">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>a promise evaluating to the first chunk for which <em>fn</em> evaluated with a truthy value,
422
- or <code>undefined</code> if no element was found.</p>
423
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
424
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#find">find</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:497</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="find.find-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">find</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</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">&gt;</span><a href="#find.find-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">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</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"> =&gt; </span><span class="tsd-signature-type">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</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">data</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">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</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">data</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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#find">find</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:501</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="flatMap" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>flat<wbr/>Map</span><a href="#flatMap" 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="flatMap.flatMap-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">flat<wbr/>Map</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</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="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#flatMap.flatMap-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>This method returns a new stream by applying the given callback to each chunk of the stream
425
- and then flattening the result.</p>
426
- <p>It is possible to return a stream or another iterable or async iterable from <em>fn</em> and the result streams
427
- will be merged (flattened) into the returned stream.</p>
428
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</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"> =&gt; </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to map over every chunk in the stream. May be async. May be a stream or generator.</p>
429
- </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">data</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">any</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">data</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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">any</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream flat-mapped with the function <em>fn</em>.</p>
430
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
431
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#flatMap">flatMap</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:528</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="forEach" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>for<wbr/>Each</span><a href="#forEach" 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="forEach.forEach-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">for<wbr/>Each</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</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">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#forEach.forEach-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>This method allows iterating a stream. For each chunk in the stream the <em>fn</em> function will be called.
432
- If the <em>fn</em> function returns a promise - that promise will be <code>await</code>ed.</p>
433
- <p>This method is different from <code>for await...of</code> loops in that it can optionally process chunks concurrently.
434
- In addition, a <code>forEach</code> iteration can only be stopped by having passed a <code>signal</code> option
435
- and aborting the related AbortController while <code>for await...of</code> can be stopped with <code>break</code> or <code>return</code>.
436
- In either case the stream will be destroyed.</p>
437
- <p>This method is different from listening to the <code>&#39;data&#39;</code> event in that it uses the <code>readable</code> event
438
- in the underlying machinary and can limit the number of concurrent <em>fn</em> calls.</p>
439
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</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"> =&gt; </span><span class="tsd-signature-type">void</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><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to call on each chunk of the stream. Async or not.</p>
440
- </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">data</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">void</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></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">data</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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">void</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></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>a promise for when the stream has finished.</p>
441
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
442
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#forEach">forEach</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:461</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getCertificate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Certificate</span><a href="#getCertificate" 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="getCertificate.getCertificate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Certificate</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">object</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.PeerCertificate.html" class="tsd-signature-type tsd-kind-interface">PeerCertificate</a><a href="#getCertificate.getCertificate-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 object representing the local certificate. The returned object has
443
- some properties corresponding to the fields of the certificate.</p>
444
- <p>See <a href="_internal_.TLSSocket.html#getPeerCertificate" class="tsd-kind-method">TLSSocket.getPeerCertificate</a> for an example of the certificate
445
- structure.</p>
446
- <p>If there is no local certificate, an empty object will be returned. If the
447
- socket has been destroyed, <code>null</code> will be returned.</p>
448
- </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">object</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.PeerCertificate.html" class="tsd-signature-type tsd-kind-interface">PeerCertificate</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v11.2.0</p>
449
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:258</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getCipher" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Cipher</span><a href="#getCipher" 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="getCipher.getCipher-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Cipher</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.CipherNameAndProtocol.html" class="tsd-signature-type tsd-kind-interface">CipherNameAndProtocol</a><a href="#getCipher.getCipher-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 object containing information on the negotiated cipher suite.</p>
450
- <p>For example, a TLSv1.2 protocol with AES256-SHA cipher:</p>
451
- <pre><code class="language-json"><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-14">&quot;name&quot;</span><span class="hl-1">: </span><span class="hl-2">&quot;AES256-SHA&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-14">&quot;standardName&quot;</span><span class="hl-1">: </span><span class="hl-2">&quot;TLS_RSA_WITH_AES_256_CBC_SHA&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-14">&quot;version&quot;</span><span class="hl-1">: </span><span class="hl-2">&quot;SSLv3&quot;</span><br/><span class="hl-1">}</span>
452
- </code><button>Copy</button></pre>
453
- <p>See <a href="https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html">SSL_CIPHER_get_name</a> for more information.</p>
454
- </div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.CipherNameAndProtocol.html" class="tsd-signature-type tsd-kind-interface">CipherNameAndProtocol</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.4</p>
455
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:275</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getEphemeralKeyInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Ephemeral<wbr/>Key<wbr/>Info</span><a href="#getEphemeralKeyInfo" 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="getEphemeralKeyInfo.getEphemeralKeyInfo-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Ephemeral<wbr/>Key<wbr/>Info</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">object</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.EphemeralKeyInfo.html" class="tsd-signature-type tsd-kind-interface">EphemeralKeyInfo</a><a href="#getEphemeralKeyInfo.getEphemeralKeyInfo-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 object representing the type, name, and size of parameter of
456
- an ephemeral key exchange in <code>perfect forward secrecy</code> on a client
457
- connection. It returns an empty object when the key exchange is not
458
- ephemeral. As this is only supported on a client socket; <code>null</code> is returned
459
- if called on a server socket. The supported types are <code>&#39;DH&#39;</code> and <code>&#39;ECDH&#39;</code>. The <code>name</code> property is available only when type is <code>&#39;ECDH&#39;</code>.</p>
460
- <p>For example: <code>{ type: &#39;ECDH&#39;, name: &#39;prime256v1&#39;, size: 256 }</code>.</p>
461
- </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">object</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.EphemeralKeyInfo.html" class="tsd-signature-type tsd-kind-interface">EphemeralKeyInfo</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v5.0.0</p>
462
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:286</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getFinished" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Finished</span><a href="#getFinished" 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="getFinished.getFinished-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Finished</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#getFinished.getFinished-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>As the <code>Finished</code> messages are message digests of the complete handshake
463
- (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
464
- be used for external authentication procedures when the authentication
465
- provided by SSL/TLS is not desired or is not enough.</p>
466
- <p>Corresponds to the <code>SSL_get_finished</code> routine in OpenSSL and may be used
467
- to implement the <code>tls-unique</code> channel binding from <a href="https://tools.ietf.org/html/rfc5929">RFC 5929</a>.</p>
468
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><p>The latest <code>Finished</code> message that has been sent to the socket as part of a SSL/TLS handshake, or <code>undefined</code> if no <code>Finished</code> message has been sent yet.</p>
469
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v9.9.0</p>
470
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:298</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
471
- set by <code>emitter.setMaxListeners(n)</code> or defaults to <a href="_internal_.TLSSocket.html#defaultMaxListeners" class="tsd-kind-property">defaultMaxListeners</a>.</p>
472
- </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>
473
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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="getPeerCertificate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Peer<wbr/>Certificate</span><a href="#getPeerCertificate" 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="getPeerCertificate.getPeerCertificate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Peer<wbr/>Certificate</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">detailed</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.DetailedPeerCertificate.html" class="tsd-signature-type tsd-kind-interface">DetailedPeerCertificate</a><a href="#getPeerCertificate.getPeerCertificate-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 object representing the peer&#39;s certificate. If the peer does not
474
- provide a certificate, an empty object will be returned. If the socket has been
475
- destroyed, <code>null</code> will be returned.</p>
476
- <p>If the full certificate chain was requested, each certificate will include an<code>issuerCertificate</code> property containing an object representing its issuer&#39;s
477
- certificate.</p>
478
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">detailed</span>: <span class="tsd-signature-type">true</span></span><div class="tsd-comment tsd-typography"><p>Include the full certificate chain if <code>true</code>, otherwise include just the peer&#39;s certificate.</p>
479
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.DetailedPeerCertificate.html" class="tsd-signature-type tsd-kind-interface">DetailedPeerCertificate</a></h4><p>A certificate object.</p>
480
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.4</p>
481
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:310</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="getPeerCertificate.getPeerCertificate-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Peer<wbr/>Certificate</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">detailed</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.PeerCertificate.html" class="tsd-signature-type tsd-kind-interface">PeerCertificate</a><a href="#getPeerCertificate.getPeerCertificate-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">detailed</span>: <span class="tsd-signature-type">false</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.PeerCertificate.html" class="tsd-signature-type tsd-kind-interface">PeerCertificate</a></h4><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:311</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="getPeerCertificate.getPeerCertificate-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Peer<wbr/>Certificate</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">detailed</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.PeerCertificate.html" class="tsd-signature-type tsd-kind-interface">PeerCertificate</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.DetailedPeerCertificate.html" class="tsd-signature-type tsd-kind-interface">DetailedPeerCertificate</a><a href="#getPeerCertificate.getPeerCertificate-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">detailed</span>: <span class="tsd-signature-type">boolean</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.PeerCertificate.html" class="tsd-signature-type tsd-kind-interface">PeerCertificate</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.DetailedPeerCertificate.html" class="tsd-signature-type tsd-kind-interface">DetailedPeerCertificate</a></h4><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:312</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getPeerFinished" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Peer<wbr/>Finished</span><a href="#getPeerFinished" 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="getPeerFinished.getPeerFinished-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Peer<wbr/>Finished</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#getPeerFinished.getPeerFinished-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>As the <code>Finished</code> messages are message digests of the complete handshake
482
- (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
483
- be used for external authentication procedures when the authentication
484
- provided by SSL/TLS is not desired or is not enough.</p>
485
- <p>Corresponds to the <code>SSL_get_peer_finished</code> routine in OpenSSL and may be used
486
- to implement the <code>tls-unique</code> channel binding from <a href="https://tools.ietf.org/html/rfc5929">RFC 5929</a>.</p>
487
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><p>The latest <code>Finished</code> message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or <code>undefined</code> if there is no <code>Finished</code> message so
488
- far.</p>
489
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v9.9.0</p>
490
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:325</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getPeerX509Certificate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Peer<wbr/>X509<wbr/>Certificate</span><a href="#getPeerX509Certificate" 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="getPeerX509Certificate.getPeerX509Certificate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Peer<wbr/>X509<wbr/>Certificate</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="_internal_.X509Certificate.html" class="tsd-signature-type tsd-kind-class">X509Certificate</a><a href="#getPeerX509Certificate.getPeerX509Certificate-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 peer certificate as an <code>X509Certificate</code> object.</p>
491
- <p>If there is no peer certificate, or the socket has been destroyed,<code>undefined</code> will be returned.</p>
492
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="_internal_.X509Certificate.html" class="tsd-signature-type tsd-kind-class">X509Certificate</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v15.9.0</p>
493
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:437</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getProtocol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Protocol</span><a href="#getProtocol" 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="getProtocol.getProtocol-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Protocol</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><a href="#getProtocol.getProtocol-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 string containing the negotiated SSL/TLS protocol version of the
494
- current connection. The value <code>&#39;unknown&#39;</code> will be returned for connected
495
- sockets that have not completed the handshaking process. The value <code>null</code> will
496
- be returned for server sockets or disconnected client sockets.</p>
497
- <p>Protocol versions are:</p>
498
- <ul>
499
- <li><code>&#39;SSLv3&#39;</code></li>
500
- <li><code>&#39;TLSv1&#39;</code></li>
501
- <li><code>&#39;TLSv1.1&#39;</code></li>
502
- <li><code>&#39;TLSv1.2&#39;</code></li>
503
- <li><code>&#39;TLSv1.3&#39;</code></li>
504
- </ul>
505
- <p>See the OpenSSL <a href="https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html"><code>SSL_get_version</code></a> documentation for more information.</p>
506
- </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></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v5.7.0</p>
507
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:343</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getSession" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Session</span><a href="#getSession" 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="getSession.getSession-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Session</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#getSession.getSession-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 TLS session data or <code>undefined</code> if no session was
508
- negotiated. On the client, the data can be provided to the <code>session</code> option of <a href="_internal_.TLSSocket.html#connect" class="tsd-kind-method">connect</a> to resume the connection. On the server, it may be useful
509
- for debugging.</p>
510
- <p>See <code>Session Resumption</code> for more information.</p>
511
- <p>Note: <code>getSession()</code> works only for TLSv1.2 and below. For TLSv1.3, applications
512
- must use the <code>&#39;session&#39;</code> event (it also works for TLSv1.2 and below).</p>
513
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.4</p>
514
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:355</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getSharedSigalgs" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Shared<wbr/>Sigalgs</span><a href="#getSharedSigalgs" 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="getSharedSigalgs.getSharedSigalgs-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Shared<wbr/>Sigalgs</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><a href="#getSharedSigalgs.getSharedSigalgs-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>See <a href="https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html">SSL_get_shared_sigalgs</a> for more information.</p>
515
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>List of signature algorithms shared between the server and the client in the order of decreasing preference.</p>
516
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.11.0</p>
517
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:361</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getTLSTicket" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>getTLSTicket</span><a href="#getTLSTicket" 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="getTLSTicket.getTLSTicket-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getTLSTicket</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#getTLSTicket.getTLSTicket-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>For a client, returns the TLS session ticket if one is available, or<code>undefined</code>. For a server, always returns <code>undefined</code>.</p>
518
- <p>It may be useful for debugging.</p>
519
- <p>See <code>Session Resumption</code> for more information.</p>
520
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.4</p>
521
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:370</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="getX509Certificate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>X509<wbr/>Certificate</span><a href="#getX509Certificate" 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="getX509Certificate.getX509Certificate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>X509<wbr/>Certificate</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="_internal_.X509Certificate.html" class="tsd-signature-type tsd-kind-class">X509Certificate</a><a href="#getX509Certificate.getX509Certificate-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 local certificate as an <code>X509Certificate</code> object.</p>
522
- <p>If there is no local certificate, or the socket has been destroyed,<code>undefined</code> will be returned.</p>
523
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="_internal_.X509Certificate.html" class="tsd-signature-type tsd-kind-class">X509Certificate</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v15.9.0</p>
524
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:444</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="isPaused" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Paused</span><a href="#isPaused" 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="isPaused.isPaused-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Paused</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isPaused.isPaused-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>readable.isPaused()</code> method returns the current operating state of the <code>Readable</code>.
525
- This is used primarily by the mechanism that underlies the <code>readable.pipe()</code> method.
526
- In most typical cases, there will be no reason to use this method directly.</p>
527
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">readable</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">Readable</span><span class="hl-1">();</span><br/><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">isPaused</span><span class="hl-1">(); </span><span class="hl-5">// === false</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">pause</span><span class="hl-1">();</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">isPaused</span><span class="hl-1">(); </span><span class="hl-5">// === true</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">resume</span><span class="hl-1">();</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">isPaused</span><span class="hl-1">(); </span><span class="hl-5">// === false</span>
528
- </code><button>Copy</button></pre>
529
- </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.11.14</p>
530
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#isPaused">isPaused</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:295</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="isSessionReused" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Session<wbr/>Reused</span><a href="#isSessionReused" 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="isSessionReused.isSessionReused-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Session<wbr/>Reused</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isSessionReused.isSessionReused-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>See <code>Session Resumption</code> for more information.</p>
531
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> if the session was reused, <code>false</code> otherwise.</p>
532
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.6</p>
533
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:376</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="iterator" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>iterator</span><a href="#iterator" 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="iterator.iterator-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">iterator</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-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="#iterator.iterator-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 iterator created by this method gives users the option to cancel the destruction
534
- of the stream if the <code>for await...of</code> loop is exited by <code>return</code>, <code>break</code>, or <code>throw</code>,
535
- or if the iterator should destroy the stream if the stream emitted an error during iteration.</p>
536
- </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">options</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">destroyOnReturn</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">destroy<wbr/>On<wbr/>Return</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><p>When set to <code>false</code>, calling <code>return</code> on the async iterator,
537
- or exiting a <code>for await...of</code> iteration using a <code>break</code>, <code>return</code>, or <code>throw</code> will not destroy the stream.
538
- <strong>Default: <code>true</code></strong>.</p>
539
- </div><div class="tsd-comment tsd-typography"></div></li></ul></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><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v16.3.0</p>
540
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#iterator">iterator</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:425</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_.TLSSocket.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>.
541
- If <code>listener</code> is provided, it will return how many times the listener is found
542
- in the list of the listeners of the event.</p>
543
- </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>
544
- </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>
545
- </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>
546
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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_.TLSSocket.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>
547
- <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>
548
- </code><button>Copy</button></pre>
549
- </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>
550
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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="map" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>map</span><a href="#map" 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="map.map-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">map</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</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="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#map.map-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>This method allows mapping over the stream. The <em>fn</em> function will be called for every chunk in the stream.
551
- If the <em>fn</em> function returns a promise - that promise will be <code>await</code>ed before being passed to the result stream.</p>
552
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</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"> =&gt; </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to map over every chunk in the stream. Async or not.</p>
553
- </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">data</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">any</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">data</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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">any</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream mapped with the function <em>fn</em>.</p>
554
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.4.0, v16.14.0</p>
555
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#map">map</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:433</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_.TLSSocket.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>
556
- </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>
557
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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
558
- named <code>eventName</code>. No checks are made to see if the <code>listener</code> has already
559
- been added. Multiple calls passing the same combination of <code>eventName</code> and
560
- <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
561
- <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>
562
- </code><button>Copy</button></pre>
563
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
564
- <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
565
- event listener to the beginning of the listeners array.</p>
566
- <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>
567
- </code><button>Copy</button></pre>
568
- </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>
569
- </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>
570
- </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>
571
- </div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:484</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;OCSPResponse&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">response</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">response</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">response</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">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:485</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;secureConnect&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-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>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:486</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;session&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">session</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">session</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">session</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">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:487</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;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-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-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></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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:488</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
572
- next time <code>eventName</code> is triggered, this listener is removed and then invoked.</p>
573
- <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>
574
- </code><button>Copy</button></pre>
575
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
576
- <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
577
- event listener to the beginning of the listeners array.</p>
578
- <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>
579
- </code><button>Copy</button></pre>
580
- </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>
581
- </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>
582
- </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>
583
- </div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:489</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;OCSPResponse&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">response</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">response</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">response</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">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:490</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;secureConnect&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-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>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:491</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;session&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">session</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">session</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">session</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">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:492</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;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-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-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></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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:493</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="pause" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>pause</span><a href="#pause" 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="pause.pause-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">pause</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="#pause.pause-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>Pauses the reading of data. That is, <code>&#39;data&#39;</code> events will not be emitted.
584
- Useful to throttle back an upload.</p>
585
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>The socket itself.</p>
586
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#pause">pause</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:151</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="pipe" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>pipe</span><a href="#pipe" 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="pipe.pipe-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">pipe</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.TLSSocket.html#pipe.pipe-1.T-2">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">destination</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 class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#pipe.pipe-1.T-2">T</a><a href="#pipe.pipe-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="pipe.pipe-1.T-2" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><a href="../interfaces/_internal_.WritableStream.html" class="tsd-signature-type tsd-kind-interface">WritableStream</a></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">destination</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#pipe.pipe-1.T-2">T</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">end</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">end</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#pipe.pipe-1.T-2">T</a></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#pipe">pipe</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:30</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
587
- event named <code>eventName</code>. No checks are made to see if the <code>listener</code> has
588
- already been added. Multiple calls passing the same combination of <code>eventName</code>
589
- and <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
590
- <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>
591
- </code><button>Copy</button></pre>
592
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
593
- </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>
594
- </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>
595
- </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>
596
- </div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:494</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;OCSPResponse&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">response</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">response</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">response</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">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:495</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;secureConnect&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-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>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:496</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;session&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">session</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">session</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">session</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">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:497</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;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-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-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></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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:498</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
597
- listener is removed, and then invoked.</p>
598
- <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>
599
- </code><button>Copy</button></pre>
600
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
601
- </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>
602
- </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>
603
- </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>
604
- </div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:499</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;OCSPResponse&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">response</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">response</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">response</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">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:500</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;secureConnect&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-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>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:501</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;session&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">session</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">session</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">session</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">this</span></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:502</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;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-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-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></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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/tls.d.ts:503</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="push" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>push</span><a href="#push" 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="push.push-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">push</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunk</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#push.push-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">chunk</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">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#push">push</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:415</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_.TLSSocket.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>,
605
- including any wrappers (such as those created by <code>.once()</code>).</p>
606
- <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>
607
- </code><button>Copy</button></pre>
608
- </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>
609
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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="read" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read</span><a href="#read" 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="read.read-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><a href="#read.read-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>readable.read()</code> method reads data out of the internal buffer and
610
- returns it. If no data is available to be read, <code>null</code> is returned. By default,
611
- the data is returned as a <code>Buffer</code> object unless an encoding has been
612
- specified using the <code>readable.setEncoding()</code> method or the stream is operating
613
- in object mode.</p>
614
- <p>The optional <code>size</code> argument specifies a specific number of bytes to read. If
615
- <code>size</code> bytes are not available to be read, <code>null</code> will be returned <em>unless</em> the
616
- stream has ended, in which case all of the data remaining in the internal buffer
617
- will be returned.</p>
618
- <p>If the <code>size</code> argument is not specified, all of the data contained in the
619
- internal buffer will be returned.</p>
620
- <p>The <code>size</code> argument must be less than or equal to 1 GiB.</p>
621
- <p>The <code>readable.read()</code> method should only be called on <code>Readable</code> streams
622
- operating in paused mode. In flowing mode, <code>readable.read()</code> is called
623
- automatically until the internal buffer is fully drained.</p>
624
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">readable</span><span class="hl-1"> = </span><span class="hl-0">getReadableStreamSomehow</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// &#39;readable&#39; may be triggered multiple times as data is buffered in</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#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-3">let</span><span class="hl-1"> </span><span class="hl-7">chunk</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;Stream is readable (new data received in buffer)&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-5">// Use a loop to make sure we read all currently available data</span><br/><span class="hl-1"> </span><span class="hl-6">while</span><span class="hl-1"> (</span><span class="hl-3">null</span><span class="hl-1"> !== (</span><span class="hl-7">chunk</span><span class="hl-1"> = </span><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">read</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">`Read </span><span class="hl-3">${</span><span class="hl-7">chunk</span><span class="hl-10">.</span><span class="hl-7">length</span><span class="hl-3">}</span><span class="hl-2"> bytes of data...`</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// &#39;end&#39; will be triggered once when there is no more data available</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;end&#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-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Reached end of stream.&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
625
- </code><button>Copy</button></pre>
626
- <p>Each call to <code>readable.read()</code> returns a chunk of data, or <code>null</code>. The chunks
627
- are not concatenated. A <code>while</code> loop is necessary to consume all data
628
- currently in the buffer. When reading a large file <code>.read()</code> may return <code>null</code>,
629
- having consumed all buffered content so far, but there is still more data to
630
- come not yet buffered. In this case a new <code>&#39;readable&#39;</code> event will be emitted
631
- when there is more data in the buffer. Finally the <code>&#39;end&#39;</code> event will be
632
- emitted when there is no more data to come.</p>
633
- <p>Therefore to read a file&#39;s whole contents from a <code>readable</code>, it is necessary
634
- to collect chunks across multiple <code>&#39;readable&#39;</code> events:</p>
635
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">chunks</span><span class="hl-1"> = [];</span><br/><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#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-3">let</span><span class="hl-1"> </span><span class="hl-7">chunk</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">while</span><span class="hl-1"> (</span><span class="hl-3">null</span><span class="hl-1"> !== (</span><span class="hl-7">chunk</span><span class="hl-1"> = </span><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">read</span><span class="hl-1">())) {</span><br/><span class="hl-1"> </span><span class="hl-7">chunks</span><span class="hl-1">.</span><span class="hl-0">push</span><span class="hl-1">(</span><span class="hl-7">chunk</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;end&#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-3">const</span><span class="hl-1"> </span><span class="hl-4">content</span><span class="hl-1"> = </span><span class="hl-7">chunks</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>
636
- </code><button>Copy</button></pre>
637
- <p>A <code>Readable</code> stream in object mode will always return a single item from
638
- a call to <code>readable.read(size)</code>, regardless of the value of the <code>size</code> argument.</p>
639
- <p>If the <code>readable.read()</code> method returns a chunk of data, a <code>&#39;data&#39;</code> event will
640
- also be emitted.</p>
641
- <p>Calling <a href="_internal_.ReadableBase.html#read" class="tsd-kind-method">read</a> after the <code>&#39;end&#39;</code> event has
642
- been emitted will return <code>null</code>. No runtime error will be raised.</p>
643
- </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">size</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Optional argument to specify how much data to read.</p>
644
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.4</p>
645
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#read">read</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:212</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="reduce" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>reduce</span><a href="#reduce" 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="reduce.reduce-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reduce</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.TLSSocket.html#reduce.reduce-1.T-3">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">initial</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-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-1.T-3">T</a><span class="tsd-signature-symbol">&gt;</span><a href="#reduce.reduce-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>This method calls <em>fn</em> on each chunk of the stream in order, passing it the result from the calculation
646
- on the previous element. It returns a promise for the final value of the reduction.</p>
647
- <p>If no <em>initial</em> value is supplied the first chunk of the stream is used as the initial value.
648
- If the stream is empty, the promise is rejected with a <code>TypeError</code> with the <code>ERR_INVALID_ARGS</code> code property.</p>
649
- <p>The reducer function iterates the stream element-by-element which means that there is no <em>concurrency</em> parameter
650
- or parallelism. To perform a reduce concurrently, you can extract the async function to <code>readable.map</code> method.</p>
651
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="reduce.reduce-1.T-3" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">any</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">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previous</span>, <span class="tsd-kind-parameter">data</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"> =&gt; </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-1.T-3">T</a><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a reducer function to call over every chunk in the stream. Async or not.</p>
652
- </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">previous</span>, <span class="tsd-kind-parameter">data</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 class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-1.T-3">T</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">previous</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-kind-parameter">data</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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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 <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-1.T-3">T</a></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">undefined</span></span><div class="tsd-comment tsd-typography"><p>the initial value to use in the reduction.</p>
653
- </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="../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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-1.T-3">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>a promise for the final value of the reduction.</p>
654
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
655
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#reduce">reduce</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:564</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="reduce.reduce-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reduce</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.TLSSocket.html#reduce.reduce-2.T-4">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">initial</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><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a><span class="tsd-signature-symbol">&gt;</span><a href="#reduce.reduce-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"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="reduce.reduce-2.T-4" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">any</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">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previous</span>, <span class="tsd-kind-parameter">data</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"> =&gt; </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a><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">previous</span>, <span class="tsd-kind-parameter">data</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 class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</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">previous</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a></span></li><li><span><span class="tsd-kind-parameter">data</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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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 <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a></h4></li></ul></li></ul></li><li><span><span class="tsd-kind-parameter">initial</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a></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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#reduce">reduce</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:569</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 socket will <em>not</em> let the program exit if it&#39;s the only socket left (the default behavior).
656
- If the socket is <code>ref</code>ed calling <code>ref</code> again will have no effect.</p>
657
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>The socket itself.</p>
658
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.1</p>
659
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#ref">ref</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:242</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>
660
- <p>It is bad practice to remove listeners added elsewhere in the code,
661
- particularly when the <code>EventEmitter</code> instance was created by some other
662
- component or module (e.g. sockets or file streams).</p>
663
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
664
- </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>
665
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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">(</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="#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>
666
- <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>
667
- </code><button>Copy</button></pre>
668
- <p><code>removeListener()</code> will remove, at most, one instance of a listener from the
669
- listener array. If any single listener has been added multiple times to the
670
- listener array for the specified <code>eventName</code>, then <code>removeListener()</code> must be
671
- called multiple times to remove each instance.</p>
672
- <p>Once an event is emitted, all listeners attached to it at the
673
- 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
674
- will not remove them from<code>emit()</code> in progress. Subsequent events behave as expected.</p>
675
- <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>
676
- </code><button>Copy</button></pre>
677
- <p>Because listeners are managed using an internal array, calling this will
678
- change the position indices of any listener registered <em>after</em> the listener
679
- being removed. This will not impact the order in which listeners are called,
680
- but it means that any copies of the listener array as returned by
681
- the <code>emitter.listeners()</code> method will need to be recreated.</p>
682
- <p>When a single function has been added as a handler multiple times for a single
683
- event (as in the example below), <code>removeListener()</code> will remove the most
684
- recently added instance. In the example the <code>once(&#39;ping&#39;)</code> listener is removed:</p>
685
- <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>
686
- </code><button>Copy</button></pre>
687
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
688
- </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">&quot;close&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-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"><h4>Since</h4><p>v0.1.26</p>
689
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1240</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<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="#removeListener.removeListener-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;data&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">chunk</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">chunk</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">chunk</span>: <span class="tsd-signature-type">any</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><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1241</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<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="#removeListener.removeListener-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;drain&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-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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1242</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<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="#removeListener.removeListener-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;end&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-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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1243</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<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="#removeListener.removeListener-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;error&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-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-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></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>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1244</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<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="#removeListener.removeListener-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;finish&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-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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1245</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<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="#removeListener.removeListener-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;pause&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-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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1246</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-8" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<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="#removeListener.removeListener-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">event</span>: <span class="tsd-signature-type">&quot;pipe&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">src</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">src</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">src</span>: <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</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>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1247</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-9" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<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="#removeListener.removeListener-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">event</span>: <span class="tsd-signature-type">&quot;readable&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-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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1248</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-10" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<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="#removeListener.removeListener-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">event</span>: <span class="tsd-signature-type">&quot;resume&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-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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1249</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-11" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<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="#removeListener.removeListener-11" 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;unpipe&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">src</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">src</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">src</span>: <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</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>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1250</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-12" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<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="#removeListener.removeListener-12" 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">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><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1251</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="renegotiate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>renegotiate</span><a href="#renegotiate" 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="renegotiate.renegotiate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">renegotiate</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</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">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span><a href="#renegotiate.renegotiate-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>tlsSocket.renegotiate()</code> method initiates a TLS renegotiation process.
690
- Upon completion, the <code>callback</code> function will be passed a single argument
691
- that is either an <code>Error</code> (if the request failed) or <code>null</code>.</p>
692
- <p>This method can be used to request a peer&#39;s certificate after the secure
693
- connection has been established.</p>
694
- <p>When running as the server, the socket will be destroyed with an error after <code>handshakeTimeout</code> timeout.</p>
695
- <p>For TLSv1.3, renegotiation cannot be initiated, it is not supported by the
696
- protocol.</p>
697
- </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>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">rejectUnauthorized</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-kind-property">requestCert</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">reject<wbr/>Unauthorized</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">request<wbr/>Cert</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5></li></ul></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-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>If <code>renegotiate()</code> returned <code>true</code>, callback is attached once to the <code>&#39;secure&#39;</code> event. If <code>renegotiate()</code> returned <code>false</code>, <code>callback</code> will be called in the next tick with
698
- an error, unless the <code>tlsSocket</code> has been destroyed, in which case <code>callback</code> will not be called at all.</p>
699
- </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-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></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">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span></h4><p><code>true</code> if renegotiation was initiated, <code>false</code> otherwise.</p>
700
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.8</p>
701
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:394</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="resetAndDestroy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>reset<wbr/>And<wbr/>Destroy</span><a href="#resetAndDestroy" 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="resetAndDestroy.resetAndDestroy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reset<wbr/>And<wbr/>Destroy</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="#resetAndDestroy.resetAndDestroy-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>Close the TCP connection by sending an RST packet and destroy the stream.
702
- If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected.
703
- Otherwise, it will call <code>socket.destroy</code> with an <code>ERR_SOCKET_CLOSED</code> Error.
704
- If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an <code>ERR_INVALID_HANDLE_TYPE</code> Error.</p>
705
- </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>v18.3.0, v16.17.0</p>
706
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#resetAndDestroy">resetAndDestroy</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:159</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="resume" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>resume</span><a href="#resume" 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="resume.resume-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">resume</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="#resume.resume-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>Resumes reading after a call to <code>socket.pause()</code>.</p>
707
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>The socket itself.</p>
708
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#resume">resume</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:164</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="setDefaultEncoding" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Default<wbr/>Encoding</span><a href="#setDefaultEncoding" 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="setDefaultEncoding.setDefaultEncoding-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Default<wbr/>Encoding</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#setDefaultEncoding.setDefaultEncoding-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>writable.setDefaultEncoding()</code> method sets the default <code>encoding</code> for a <code>Writable</code> stream.</p>
709
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span><div class="tsd-comment tsd-typography"><p>The new default encoding</p>
710
- </div><div class="tsd-comment tsd-typography"></div></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.11.15</p>
711
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#setDefaultEncoding">setDefaultEncoding</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1123</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="setEncoding" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Encoding</span><a href="#setEncoding" 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="setEncoding.setEncoding-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Encoding</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">encoding</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="#setEncoding.setEncoding-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>Set the encoding for the socket as a <code>Readable Stream</code>. See <code>readable.setEncoding()</code> for more information.</p>
712
- </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">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>The socket itself.</p>
713
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.90</p>
714
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#setEncoding">setEncoding</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:145</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="setKeepAlive" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Keep<wbr/>Alive</span><a href="#setKeepAlive" 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="setKeepAlive.setKeepAlive-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Keep<wbr/>Alive</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">enable</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">initialDelay</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="#setKeepAlive.setKeepAlive-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>Enable/disable keep-alive functionality, and optionally set the initial
715
- delay before the first keepalive probe is sent on an idle socket.</p>
716
- <p>Set <code>initialDelay</code> (in milliseconds) to set the delay between the last
717
- data packet received and the first keepalive probe. Setting <code>0</code> for<code>initialDelay</code> will leave the value unchanged from the default
718
- (or previous) setting.</p>
719
- <p>Enabling the keep-alive functionality will set the following socket options:</p>
720
- <ul>
721
- <li><code>SO_KEEPALIVE=1</code></li>
722
- <li><code>TCP_KEEPIDLE=initialDelay</code></li>
723
- <li><code>TCP_KEEPCNT=10</code></li>
724
- <li><code>TCP_KEEPINTVL=1</code></li>
725
- </ul>
726
- </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">enable</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">initialDelay</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>The socket itself.</p>
727
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.92</p>
728
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#setKeepAlive">setKeepAlive</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:222</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
729
- added for a particular event. This is a useful default that helps finding
730
- memory leaks. The <code>emitter.setMaxListeners()</code> method allows the limit to be
731
- 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>
732
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
733
- </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>
734
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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="setMaxSendFragment" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Max<wbr/>Send<wbr/>Fragment</span><a href="#setMaxSendFragment" 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="setMaxSendFragment.setMaxSendFragment-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Max<wbr/>Send<wbr/>Fragment</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#setMaxSendFragment.setMaxSendFragment-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>tlsSocket.setMaxSendFragment()</code> method sets the maximum TLS fragment size.
735
- Returns <code>true</code> if setting the limit succeeded; <code>false</code> otherwise.</p>
736
- <p>Smaller fragment sizes decrease the buffering latency on the client: larger
737
- fragments are buffered by the TLS layer until the entire fragment is received
738
- and its integrity is verified; large fragments can span multiple roundtrips
739
- and their processing can be delayed due to packet loss or reordering. However,
740
- smaller fragments add extra TLS framing bytes and CPU overhead, which may
741
- decrease overall server throughput.</p>
742
- </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">size</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The maximum TLS fragment size. The maximum value is <code>16384</code>.</p>
743
- </div><div class="tsd-comment tsd-typography"></div></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.11.11</p>
744
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/tls.d.ts:414</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="setNoDelay" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>No<wbr/>Delay</span><a href="#setNoDelay" 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="setNoDelay.setNoDelay-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>No<wbr/>Delay</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">noDelay</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="#setNoDelay.setNoDelay-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>Enable/disable the use of Nagle&#39;s algorithm.</p>
745
- <p>When a TCP connection is created, it will have Nagle&#39;s algorithm enabled.</p>
746
- <p>Nagle&#39;s algorithm delays data before it is sent via the network. It attempts
747
- to optimize throughput at the expense of latency.</p>
748
- <p>Passing <code>true</code> for <code>noDelay</code> or not passing an argument will disable Nagle&#39;s
749
- algorithm for the socket. Passing <code>false</code> for <code>noDelay</code> will enable Nagle&#39;s
750
- algorithm.</p>
751
- </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">noDelay</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>The socket itself.</p>
752
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.90</p>
753
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#setNoDelay">setNoDelay</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:202</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="setTimeout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Timeout</span><a href="#setTimeout" 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="setTimeout.setTimeout-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Timeout</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">timeout</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="#setTimeout.setTimeout-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 socket to timeout after <code>timeout</code> milliseconds of inactivity on
754
- the socket. By default <code>net.Socket</code> do not have a timeout.</p>
755
- <p>When an idle timeout is triggered the socket will receive a <code>&#39;timeout&#39;</code> event but the connection will not be severed. The user must manually call <code>socket.end()</code> or <code>socket.destroy()</code> to
756
- end the connection.</p>
757
- <pre><code class="language-js"><span class="hl-7">socket</span><span class="hl-1">.</span><span class="hl-0">setTimeout</span><span class="hl-1">(</span><span class="hl-9">3000</span><span class="hl-1">);</span><br/><span class="hl-7">socket</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;timeout&#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-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;socket timeout&#39;</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><br/><span class="hl-1">});</span>
758
- </code><button>Copy</button></pre>
759
- <p>If <code>timeout</code> is 0, then the existing idle timeout is disabled.</p>
760
- <p>The optional <code>callback</code> parameter will be added as a one-time listener for the <code>&#39;timeout&#39;</code> event.</p>
761
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">timeout</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">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">this</span></h4><p>The socket itself.</p>
762
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.90</p>
763
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#setTimeout">setTimeout</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:186</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="some" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>some</span><a href="#some" 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="some.some-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">some</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</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">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#some.some-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>This method is similar to <code>Array.prototype.some</code> and calls <em>fn</em> on each chunk in the stream
764
- until the awaited return value is <code>true</code> (or any truthy value). Once an <em>fn</em> call on a chunk
765
- <code>await</code>ed return value is truthy, the stream is destroyed and the promise is fulfilled with <code>true</code>.
766
- If none of the <em>fn</em> calls on the chunks return a truthy value, the promise is fulfilled with <code>false</code>.</p>
767
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</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"> =&gt; </span><span class="tsd-signature-type">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to call on each chunk of the stream. Async or not.</p>
768
- </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">data</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">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</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">data</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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">boolean</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">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p>a promise evaluating to <code>true</code> if <em>fn</em> returned a truthy value for at least one of the chunks.</p>
769
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
770
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#some">some</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:483</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="take" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>take</span><a href="#take" 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="take.take-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">take</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">limit</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="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#take.take-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>This method returns a new stream with the first <em>limit</em> chunks.</p>
771
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">limit</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>the number of chunks to take from the readable.</p>
772
- </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="../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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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 <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream with <em>limit</em> chunks taken.</p>
773
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
774
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#take">take</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:542</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="toArray" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>to<wbr/>Array</span><a href="#toArray" 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="toArray.toArray-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">to<wbr/>Array</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-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="#toArray.toArray-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>This method allows easily obtaining the contents of a stream.</p>
775
- <p>As this method reads the entire stream into memory, it negates the benefits of streams. It&#39;s intended
776
- for interoperability and convenience, not as the primary way to consume streams.</p>
777
- </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">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_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</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><p>a promise containing an array with the contents of the stream.</p>
778
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
779
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#toArray">toArray</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:473</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="uncork" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>uncork</span><a href="#uncork" 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="uncork.uncork-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">uncork</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><a href="#uncork.uncork-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>writable.uncork()</code> method flushes all data buffered since <a href="_internal_.WritableBase.html#cork" class="tsd-kind-method">cork</a> was called.</p>
780
- <p>When using <code>writable.cork()</code> and <code>writable.uncork()</code> to manage the buffering
781
- of writes to a stream, defer calls to <code>writable.uncork()</code> using <code>process.nextTick()</code>. Doing so allows batching of all <code>writable.write()</code> calls that occur within a given Node.js event
782
- loop phase.</p>
783
- <pre><code class="language-js"><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">cork</span><span class="hl-1">();</span><br/><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">write</span><span class="hl-1">(</span><span class="hl-2">&#39;some &#39;</span><span class="hl-1">);</span><br/><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">write</span><span class="hl-1">(</span><span class="hl-2">&#39;data &#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><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">uncork</span><span class="hl-1">());</span>
784
- </code><button>Copy</button></pre>
785
- <p>If the <code>writable.cork()</code> method is called multiple times on a stream, the
786
- same number of calls to <code>writable.uncork()</code> must be called to flush the buffered
787
- data.</p>
788
- <pre><code class="language-js"><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">cork</span><span class="hl-1">();</span><br/><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">write</span><span class="hl-1">(</span><span class="hl-2">&#39;some &#39;</span><span class="hl-1">);</span><br/><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">cork</span><span class="hl-1">();</span><br/><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">write</span><span class="hl-1">(</span><span class="hl-2">&#39;data &#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">stream</span><span class="hl-1">.</span><span class="hl-0">uncork</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-5">// The data will not be flushed until uncork() is called a second time.</span><br/><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">uncork</span><span class="hl-1">();</span><br/><span class="hl-1">});</span>
789
- </code><button>Copy</button></pre>
790
- <p>See also: <code>writable.cork()</code>.</p>
791
- </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.11.2</p>
792
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#uncork">uncork</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1128</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="unpipe" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>unpipe</span><a href="#unpipe" 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="unpipe.unpipe-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">unpipe</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">destination</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="#unpipe.unpipe-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>readable.unpipe()</code> method detaches a <code>Writable</code> stream previously attached
793
- using the <a href="_internal_.ReadableBase.html#pipe" class="tsd-kind-method">pipe</a> method.</p>
794
- <p>If the <code>destination</code> is not specified, then <em>all</em> pipes are detached.</p>
795
- <p>If the <code>destination</code> is specified, but no pipe is set up for it, then
796
- the method does nothing.</p>
797
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">fs</span><span class="hl-1"> = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">&#39;node:fs&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">readable</span><span class="hl-1"> = </span><span class="hl-0">getReadableStreamSomehow</span><span class="hl-1">();</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">writable</span><span class="hl-1"> = </span><span class="hl-7">fs</span><span class="hl-1">.</span><span class="hl-0">createWriteStream</span><span class="hl-1">(</span><span class="hl-2">&#39;file.txt&#39;</span><span class="hl-1">);</span><br/><span class="hl-5">// All the data from readable goes into &#39;file.txt&#39;,</span><br/><span class="hl-5">// but only for the first second.</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">pipe</span><span class="hl-1">(</span><span class="hl-7">writable</span><span class="hl-1">);</span><br/><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">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Stop writing to file.txt.&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">unpipe</span><span class="hl-1">(</span><span class="hl-7">writable</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;Manually close the file stream.&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">writable</span><span class="hl-1">.</span><span class="hl-0">end</span><span class="hl-1">();</span><br/><span class="hl-1">}, </span><span class="hl-9">1000</span><span class="hl-1">);</span>
798
- </code><button>Copy</button></pre>
799
- </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">destination</span>: <a href="../interfaces/_internal_.WritableStream.html" class="tsd-signature-type tsd-kind-interface">WritableStream</a></span><div class="tsd-comment tsd-typography"><p>Optional specific stream to unpipe</p>
800
- </div><div class="tsd-comment tsd-typography"></div></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.9.4</p>
801
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#unpipe">unpipe</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:322</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 socket will allow the program to exit if this is the only
802
- active socket in the event system. If the socket is already <code>unref</code>ed calling<code>unref()</code> again will have no effect.</p>
803
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>The socket itself.</p>
804
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.1</p>
805
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#unref">unref</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:235</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="unshift" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>unshift</span><a href="#unshift" 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="unshift.unshift-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">unshift</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunk</span>, <span class="tsd-kind-parameter">encoding</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><a href="#unshift.unshift-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>Passing <code>chunk</code> as <code>null</code> signals the end of the stream (EOF) and behaves the
806
- same as <code>readable.push(null)</code>, after which no more data can be written. The EOF
807
- signal is put at the end of the buffer and any buffered data will still be
808
- flushed.</p>
809
- <p>The <code>readable.unshift()</code> method pushes a chunk of data back into the internal
810
- buffer. This is useful in certain situations where a stream is being consumed by
811
- code that needs to &quot;un-consume&quot; some amount of data that it has optimistically
812
- pulled out of the source, so that the data can be passed on to some other party.</p>
813
- <p>The <code>stream.unshift(chunk)</code> method cannot be called after the <code>&#39;end&#39;</code> event
814
- has been emitted or a runtime error will be thrown.</p>
815
- <p>Developers using <code>stream.unshift()</code> often should consider switching to
816
- use of a <code>Transform</code> stream instead. See the <code>API for stream implementers</code> section for more information.</p>
817
- <pre><code class="language-js"><span class="hl-5">// Pull off a header delimited by \n\n.</span><br/><span class="hl-5">// Use unshift() if we get too much.</span><br/><span class="hl-5">// Call the callback with (error, header, stream).</span><br/><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-4">StringDecoder</span><span class="hl-1"> } = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">&#39;node:string_decoder&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">parseHeader</span><span class="hl-1">(</span><span class="hl-7">stream</span><span class="hl-1">, </span><span class="hl-7">callback</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">stream</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">callback</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#39;</span><span class="hl-1">, </span><span class="hl-7">onReadable</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">decoder</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">StringDecoder</span><span class="hl-1">(</span><span class="hl-2">&#39;utf8&#39;</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">header</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-3">function</span><span class="hl-1"> </span><span class="hl-0">onReadable</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">chunk</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">while</span><span class="hl-1"> (</span><span class="hl-3">null</span><span class="hl-1"> !== (</span><span class="hl-7">chunk</span><span class="hl-1"> = </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">read</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">str</span><span class="hl-1"> = </span><span class="hl-7">decoder</span><span class="hl-1">.</span><span class="hl-0">write</span><span class="hl-1">(</span><span class="hl-7">chunk</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">str</span><span class="hl-1">.</span><span class="hl-0">includes</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\n\n</span><span class="hl-2">&#39;</span><span class="hl-1">)) {</span><br/><span class="hl-1"> </span><span class="hl-5">// Found the header boundary.</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">split</span><span class="hl-1"> = </span><span class="hl-7">str</span><span class="hl-1">.</span><span class="hl-0">split</span><span class="hl-1">(</span><span class="hl-12">/\n\n/</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">header</span><span class="hl-1"> += </span><span class="hl-7">split</span><span class="hl-1">.</span><span class="hl-0">shift</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">remaining</span><span class="hl-1"> = </span><span class="hl-7">split</span><span class="hl-1">.</span><span class="hl-0">join</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\n\n</span><span class="hl-2">&#39;</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">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-7">remaining</span><span class="hl-1">, </span><span class="hl-2">&#39;utf8&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">, </span><span class="hl-7">callback</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-5">// Remove the &#39;readable&#39; listener before unshifting.</span><br/><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#39;</span><span class="hl-1">, </span><span class="hl-7">onReadable</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">buf</span><span class="hl-1">.</span><span class="hl-7">length</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">unshift</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-5">// Now the body of the message can be read from the stream.</span><br/><span class="hl-1"> </span><span class="hl-0">callback</span><span class="hl-1">(</span><span class="hl-3">null</span><span class="hl-1">, </span><span class="hl-7">header</span><span class="hl-1">, </span><span class="hl-7">stream</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-6">return</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><span class="hl-5">// Still reading the header.</span><br/><span class="hl-1"> </span><span class="hl-7">header</span><span class="hl-1"> += </span><span class="hl-7">str</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
818
- </code><button>Copy</button></pre>
819
- <p>Unlike <a href="_internal_.ReadableBase.html#push" class="tsd-kind-method">push</a>, <code>stream.unshift(chunk)</code> will not
820
- end the reading process by resetting the internal reading state of the stream.
821
- This can cause unexpected results if <code>readable.unshift()</code> is called during a
822
- read (i.e. from within a <a href="_internal_.ReadableBase.html#_read" class="tsd-kind-method">_read</a> implementation on a
823
- custom stream). Following the call to <code>readable.unshift()</code> with an immediate <a href="_internal_.ReadableBase.html#push" class="tsd-kind-method">push</a> will reset the reading state appropriately,
824
- however it is best to simply avoid calling <code>readable.unshift()</code> while in the
825
- process of performing a read.</p>
826
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">chunk</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><p>Chunk of data to unshift onto the read queue. For streams not operating in object mode, <code>chunk</code> must
827
- be a {string}, {Buffer}, {TypedArray}, {DataView} or <code>null</code>. For object mode streams, <code>chunk</code> may be any JavaScript value.</p>
828
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span><div class="tsd-comment tsd-typography"><p>Encoding of string chunks. Must be a valid <code>Buffer</code> encoding, such as <code>&#39;utf8&#39;</code> or <code>&#39;ascii&#39;</code>.</p>
829
- </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.9.11</p>
830
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#unshift">unshift</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:388</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="wrap" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wrap</span><a href="#wrap" 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="wrap.wrap-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">wrap</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">stream</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#wrap.wrap-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>Prior to Node.js 0.10, streams did not implement the entire <code>node:stream</code> module API as it is currently defined. (See <code>Compatibility</code> for more
831
- information.)</p>
832
- <p>When using an older Node.js library that emits <code>&#39;data&#39;</code> events and has a <a href="_internal_.ReadableBase.html#pause" class="tsd-kind-method">pause</a> method that is advisory only, the <code>readable.wrap()</code> method can be used to create a <code>Readable</code>
833
- stream that uses
834
- the old stream as its data source.</p>
835
- <p>It will rarely be necessary to use <code>readable.wrap()</code> but the method has been
836
- provided as a convenience for interacting with older Node.js applications and
837
- libraries.</p>
838
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-4">OldReader</span><span class="hl-1"> } = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">&#39;./old-api-module.js&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-4">Readable</span><span class="hl-1"> } = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">&#39;node:stream&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">oreader</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">OldReader</span><span class="hl-1">();</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myReader</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Readable</span><span class="hl-1">().</span><span class="hl-0">wrap</span><span class="hl-1">(</span><span class="hl-7">oreader</span><span class="hl-1">);</span><br/><br/><span class="hl-7">myReader</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#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-7">myReader</span><span class="hl-1">.</span><span class="hl-0">read</span><span class="hl-1">(); </span><span class="hl-5">// etc.</span><br/><span class="hl-1">});</span>
839
- </code><button>Copy</button></pre>
840
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">stream</span>: <a href="../interfaces/_internal_.ReadableStream-1.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a></span><div class="tsd-comment tsd-typography"><p>An &quot;old style&quot; readable stream</p>
841
- </div><div class="tsd-comment tsd-typography"></div></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.9.4</p>
842
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#wrap">wrap</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:414</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="write" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write</span><a href="#write" 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="write.write-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">buffer</span>, <span class="tsd-kind-parameter">cb</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#write.write-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>Sends data on the socket. The second parameter specifies the encoding in the
843
- case of a string. It defaults to UTF8 encoding.</p>
844
- <p>Returns <code>true</code> if the entire data was flushed successfully to the kernel
845
- buffer. Returns <code>false</code> if all or part of the data was queued in user memory.<code>&#39;drain&#39;</code> will be emitted when the buffer is again free.</p>
846
- <p>The optional <code>callback</code> parameter will be executed when the data is finally
847
- written out, which may not be immediately.</p>
848
- <p>See <code>Writable</code> stream <code>write()</code> method for more
849
- information.</p>
850
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">buffer</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Uint8Array</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">cb</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><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">boolean</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.90</p>
851
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#write">write</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:115</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="write.write-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">str</span>, <span class="tsd-kind-parameter">encoding</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-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#write.write-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">str</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Uint8Array</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">cb</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><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">boolean</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#write">write</a></p><ul><li>Defined in node_modules/@types/node/net.d.ts:116</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>
852
- <p>Listening to the <code>abort</code> event on abort signals is unsafe and may
853
- lead to resource leaks since another third party with the signal can
854
- call <code>e.stopImmediatePropagation()</code>. Unfortunately Node.js cannot change
855
- this since it would violate the web standard. Additionally, the original
856
- API makes it easy to forget to remove listeners.</p>
857
- <p>This API allows safely using <code>AbortSignal</code>s in Node.js APIs by solving these
858
- two issues by listening to the event such that <code>stopImmediatePropagation</code> does
859
- not prevent the listener from running.</p>
860
- <p>Returns a disposable so that it may be unsubscribed from more easily.</p>
861
- <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>
862
- </code><button>Copy</button></pre>
863
- </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>
864
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v20.5.0</p>
865
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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="from" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>from</span><a href="#from" 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="from.from-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">from</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">src</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Duplex.html" class="tsd-signature-type tsd-kind-class">Duplex</a><a href="#from.from-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>A utility method for creating duplex streams.</p>
866
- <ul>
867
- <li><code>Stream</code> converts writable stream into writable <code>Duplex</code> and readable stream
868
- to <code>Duplex</code>.</li>
869
- <li><code>Blob</code> converts into readable <code>Duplex</code>.</li>
870
- <li><code>string</code> converts into readable <code>Duplex</code>.</li>
871
- <li><code>ArrayBuffer</code> converts into readable <code>Duplex</code>.</li>
872
- <li><code>AsyncIterable</code> converts into a readable <code>Duplex</code>. Cannot yield <code>null</code>.</li>
873
- <li><code>AsyncGeneratorFunction</code> converts into a readable/writable transform
874
- <code>Duplex</code>. Must take a source <code>AsyncIterable</code> as first parameter. Cannot yield
875
- <code>null</code>.</li>
876
- <li><code>AsyncFunction</code> converts into a writable <code>Duplex</code>. Must return
877
- either <code>null</code> or <code>undefined</code></li>
878
- <li><code>Object ({ writable, readable })</code> converts <code>readable</code> and
879
- <code>writable</code> into <code>Stream</code> and then combines them into <code>Duplex</code> where the
880
- <code>Duplex</code> will write to the <code>writable</code> and read from the <code>readable</code>.</li>
881
- <li><code>Promise</code> converts into readable <code>Duplex</code>. Value <code>null</code> is ignored.</li>
882
- </ul>
883
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">src</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Object.html" class="tsd-signature-type tsd-kind-interface">Object</a><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">&gt;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="_internal_.Stream.html" class="tsd-signature-type tsd-kind-class">Stream</a><span class="tsd-signature-symbol"> | </span><a href="_internal_.Blob.html" class="tsd-signature-type tsd-kind-class">Blob</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Iterable.html" class="tsd-signature-type tsd-kind-interface">Iterable</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.AsyncIterable.html" class="tsd-signature-type tsd-kind-interface">AsyncIterable</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.AsyncGeneratorFunction.html" class="tsd-signature-type tsd-kind-interface">AsyncGeneratorFunction</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Duplex.html" class="tsd-signature-type tsd-kind-class">Duplex</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v16.8.0</p>
884
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#from">from</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1099</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="fromWeb" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>from<wbr/>Web</span><a href="#fromWeb" 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="fromWeb.fromWeb-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">from<wbr/>Web</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">duplexStream</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="_internal_.Duplex.html" class="tsd-signature-type tsd-kind-class">Duplex</a><a href="#fromWeb.fromWeb-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>A utility method for creating a <code>Duplex</code> from a web <code>ReadableStream</code> and <code>WritableStream</code>.</p>
885
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">duplexStream</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">readable</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.ReadableStream.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-kind-property">writable</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.WritableStream-1.html" class="tsd-signature-type tsd-kind-interface">WritableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">readable</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.ReadableStream.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">writable</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.WritableStream-1.html" class="tsd-signature-type tsd-kind-interface">WritableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></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_.DuplexOptions.html" class="tsd-signature-type tsd-kind-interface">DuplexOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;encoding&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;highWaterMark&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;objectMode&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;decodeStrings&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;allowHalfOpen&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Duplex.html" class="tsd-signature-type tsd-kind-class">Duplex</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.0.0</p>
886
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#fromWeb">fromWeb</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1143</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>
887
- <p>For <code>EventEmitter</code>s this behaves exactly the same as calling <code>.listeners</code> on
888
- the emitter.</p>
889
- <p>For <code>EventTarget</code>s this is the only way to get the event listeners for the
890
- event target. This is useful for debugging and diagnostic purposes.</p>
891
- <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>
892
- </code><button>Copy</button></pre>
893
- </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>
894
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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>
895
- <p>For <code>EventEmitter</code>s this behaves exactly the same as calling <code>.getMaxListeners</code> on
896
- the emitter.</p>
897
- <p>For <code>EventTarget</code>s this is the only way to get the max event listeners for the
898
- event target. If the number of event handlers on a single EventTarget exceeds
899
- the max set, the EventTarget will print a warning.</p>
900
- <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>
901
- </code><button>Copy</button></pre>
902
- </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>
903
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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="isDisturbed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>is<wbr/>Disturbed</span><a href="#isDisturbed" 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="isDisturbed.isDisturbed-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Disturbed</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">stream</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isDisturbed.isDisturbed-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 whether the stream has been read from or cancelled.</p>
904
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">stream</span>: <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.ReadableStream-1.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a></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>v16.8.0</p>
905
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#isDisturbed">isDisturbed</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:65</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>
906
- <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>
907
- </code><button>Copy</button></pre>
908
- </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>
909
- </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>
910
- </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>
911
- <h4>Deprecated</h4><p>Since v3.2.0 - Use <code>listenerCount</code> instead.</p>
912
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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-6" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>on</span><a href="#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></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="on-6.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">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-6.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-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>
913
- </code><button>Copy</button></pre>
914
- <p>Returns an <code>AsyncIterator</code> that iterates <code>eventName</code> events. It will throw
915
- if the <code>EventEmitter</code> emits <code>&#39;error&#39;</code>. It removes all listeners when
916
- exiting the loop. The <code>value</code> returned by each iteration is an array
917
- composed of the emitted event arguments.</p>
918
- <p>An <code>AbortSignal</code> can be used to cancel waiting on events:</p>
919
- <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>
920
- </code><button>Copy</button></pre>
921
- </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>
922
- </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>
923
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.6.0, v12.16.0</p>
924
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#on-14">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-6.on-8" 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-6.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></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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#on-14">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-6" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>once</span><a href="#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></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="once-6.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">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-6.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-comment tsd-typography"><p>Creates a <code>Promise</code> that is fulfilled when the <code>EventEmitter</code> emits the given
925
- event or that is rejected if the <code>EventEmitter</code> emits <code>&#39;error&#39;</code> while waiting.
926
- The <code>Promise</code> will resolve with an array of all the arguments emitted to the
927
- given event.</p>
928
- <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
929
- semantics and does not listen to the <code>&#39;error&#39;</code> event.</p>
930
- <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>
931
- </code><button>Copy</button></pre>
932
- <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
933
- &#39;<code>error&#39;</code> event itself, then it is treated as any other kind of event without
934
- special handling:</p>
935
- <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>
936
- </code><button>Copy</button></pre>
937
- <p>An <code>AbortSignal</code> can be used to cancel waiting for the event:</p>
938
- <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>
939
- </code><button>Copy</button></pre>
940
- </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>
941
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#once-14">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-6.once-8" 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-6.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></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_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#once-14">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>
942
- </code><button>Copy</button></pre>
943
- </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>
944
- </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>
945
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.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 class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="toWeb" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>to<wbr/>Web</span><a href="#toWeb" 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="toWeb.toWeb-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">to<wbr/>Web</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">streamDuplex</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">readable</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.ReadableStream.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-kind-property">writable</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.WritableStream-1.html" class="tsd-signature-type tsd-kind-interface">WritableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><a href="#toWeb.toWeb-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>A utility method for creating a web <code>ReadableStream</code> and <code>WritableStream</code> from a <code>Duplex</code>.</p>
946
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">streamDuplex</span>: <a href="_internal_.Duplex.html" class="tsd-signature-type tsd-kind-class">Duplex</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">readable</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.ReadableStream.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-kind-property">writable</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.WritableStream-1.html" class="tsd-signature-type tsd-kind-interface">WritableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">readable</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.ReadableStream.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">writable</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.WritableStream-1.html" class="tsd-signature-type tsd-kind-interface">WritableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.0.0</p>
947
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Socket.html">Socket</a>.<a href="_internal_.Socket.html#toWeb">toWeb</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:1134</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="#allowHalfOpen" 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>allow<wbr/>Half<wbr/>Open</span></a><a href="#alpnProtocol" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>alpn<wbr/>Protocol</span></a><a href="#authorizationError" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>authorization<wbr/>Error</span></a><a href="#authorized" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>authorized</span></a><a href="#autoSelectFamilyAttemptedAddresses" 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>auto<wbr/>Select<wbr/>Family<wbr/>Attempted<wbr/>Addresses</span></a><a href="#bufferSize" 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>buffer<wbr/>Size</span></a><a href="#bytesRead" 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>bytes<wbr/>Read</span></a><a href="#bytesWritten" 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>bytes<wbr/>Written</span></a><a href="#closed" 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>closed</span></a><a href="#connecting" 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>connecting</span></a><a href="#destroyed" 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>destroyed</span></a><a href="#encrypted" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>encrypted</span></a><a href="#errored" 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>errored</span></a><a href="#localAddress" 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>local<wbr/>Address</span></a><a href="#localFamily" 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>local<wbr/>Family</span></a><a href="#localPort" 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>local<wbr/>Port</span></a><a href="#pending" 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>pending</span></a><a href="#readable" 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>readable</span></a><a href="#readableAborted" 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>readable<wbr/>Aborted</span></a><a href="#readableDidRead" 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>readable<wbr/>Did<wbr/>Read</span></a><a href="#readableEncoding" 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>readable<wbr/>Encoding</span></a><a href="#readableEnded" 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>readable<wbr/>Ended</span></a><a href="#readableFlowing" 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>readable<wbr/>Flowing</span></a><a href="#readableHighWaterMark" 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>readable<wbr/>High<wbr/>Water<wbr/>Mark</span></a><a href="#readableLength" 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>readable<wbr/>Length</span></a><a href="#readableObjectMode" 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>readable<wbr/>Object<wbr/>Mode</span></a><a href="#readyState" 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>ready<wbr/>State</span></a><a href="#remoteAddress" 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>remote<wbr/>Address</span></a><a href="#remoteFamily" 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>remote<wbr/>Family</span></a><a href="#remotePort" 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>remote<wbr/>Port</span></a><a href="#timeout" 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>timeout</span></a><a href="#writable" 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>writable</span></a><a href="#writableCorked" 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>writable<wbr/>Corked</span></a><a href="#writableEnded" 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>writable<wbr/>Ended</span></a><a href="#writableFinished" 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>writable<wbr/>Finished</span></a><a href="#writableHighWaterMark" 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>writable<wbr/>High<wbr/>Water<wbr/>Mark</span></a><a href="#writableLength" 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>writable<wbr/>Length</span></a><a href="#writableNeedDrain" 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>writable<wbr/>Need<wbr/>Drain</span></a><a href="#writableObjectMode" 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>writable<wbr/>Object<wbr/>Mode</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="#_asyncIterator_" 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/>Iterator]</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="#_construct" 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>_construct</span></a><a href="#_destroy" 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>_destroy</span></a><a href="#_final" 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>_final</span></a><a href="#_read" 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>_read</span></a><a href="#_write" 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>_write</span></a><a href="#_writev" 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>_writev</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="#asIndexedPairs" 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>as<wbr/>Indexed<wbr/>Pairs</span></a><a href="#compose" 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>compose</span></a><a href="#connect" 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>connect</span></a><a href="#cork" 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>cork</span></a><a href="#destroy" 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>destroy</span></a><a href="#destroySoon" 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>destroy<wbr/>Soon</span></a><a href="#disableRenegotiation" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>disable<wbr/>Renegotiation</span></a><a href="#drop" 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>drop</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="#enableTrace" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>enable<wbr/>Trace</span></a><a href="#end" 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>end</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="#every" 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>every</span></a><a href="#exportKeyingMaterial" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>export<wbr/>Keying<wbr/>Material</span></a><a href="#filter" 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>filter</span></a><a href="#find" 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>find</span></a><a href="#flatMap" 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>flat<wbr/>Map</span></a><a href="#forEach" 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>for<wbr/>Each</span></a><a href="#getCertificate" 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/>Certificate</span></a><a href="#getCipher" 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/>Cipher</span></a><a href="#getEphemeralKeyInfo" 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/>Ephemeral<wbr/>Key<wbr/>Info</span></a><a href="#getFinished" 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/>Finished</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="#getPeerCertificate" 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/>Peer<wbr/>Certificate</span></a><a href="#getPeerFinished" 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/>Peer<wbr/>Finished</span></a><a href="#getPeerX509Certificate" 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/>Peer<wbr/>X509<wbr/>Certificate</span></a><a href="#getProtocol" 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/>Protocol</span></a><a href="#getSession" 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/>Session</span></a><a href="#getSharedSigalgs" 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/>Shared<wbr/>Sigalgs</span></a><a href="#getTLSTicket" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>getTLSTicket</span></a><a href="#getX509Certificate" 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/>X509<wbr/>Certificate</span></a><a href="#isPaused" 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>is<wbr/>Paused</span></a><a href="#isSessionReused" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Session<wbr/>Reused</span></a><a href="#iterator" 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>iterator</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="#map" 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>map</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="#pause" 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>pause</span></a><a href="#pipe" 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>pipe</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="#push" 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>push</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="#read" 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>read</span></a><a href="#reduce" 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>reduce</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="#renegotiate" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>renegotiate</span></a><a href="#resetAndDestroy" 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>reset<wbr/>And<wbr/>Destroy</span></a><a href="#resume" 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>resume</span></a><a href="#setDefaultEncoding" 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/>Default<wbr/>Encoding</span></a><a href="#setEncoding" 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/>Encoding</span></a><a href="#setKeepAlive" 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/>Keep<wbr/>Alive</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="#setMaxSendFragment" 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/>Max<wbr/>Send<wbr/>Fragment</span></a><a href="#setNoDelay" 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/>No<wbr/>Delay</span></a><a href="#setTimeout" 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/>Timeout</span></a><a href="#some" 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>some</span></a><a href="#take" 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>take</span></a><a href="#toArray" 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>to<wbr/>Array</span></a><a href="#uncork" 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>uncork</span></a><a href="#unpipe" 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>unpipe</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="#unshift" 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>unshift</span></a><a href="#wrap" 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>wrap</span></a><a href="#write" 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>write</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="#from" 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>from</span></a><a href="#fromWeb" 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>from<wbr/>Web</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="#isDisturbed" 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>is<wbr/>Disturbed</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-6" 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-6" 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><a href="#toWeb" 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>to<wbr/>Web</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>