@@ -250,19 +250,19 @@ added: v0.11.4
250250
251251Produces a socket/stream to be used for HTTP requests.
252252
253- By default, this function behaves identically to [ ` net.createConnection(options ) ` ] [ ] ,
253+ By default, this function behaves identically to [ ` net.createConnection() ` ] [ ] ,
254254synchronously returning the created socket. The optional ` callback ` parameter in the
255255signature is ** not** used by this default implementation.
256256
257257However, custom agents may override this method to provide greater flexibility,
258258for example, to create sockets asynchronously. When overriding ` createConnection ` :
259259
260- 1 . ** Synchronous socket creation** : The overriding method can return the
261- socket/stream directly.
262- 2 . ** Asynchronous socket creation** : The overriding method can accept the ` callback `
263- and pass the created socket/stream to it (e.g., ` callback(null, newSocket) ` ).
264- If an error occurs during socket creation, it should be passed as the first
265- argument to the ` callback ` (e.g., ` callback(err) ` ).
260+ 1 . ** Synchronous socket creation** : The overriding method can return the
261+ socket/stream directly.
262+ 2 . ** Asynchronous socket creation** : The overriding method can accept the ` callback `
263+ and pass the created socket/stream to it (e.g., ` callback(null, newSocket) ` ).
264+ If an error occurs during socket creation, it should be passed as the first
265+ argument to the ` callback ` (e.g., ` callback(err) ` ).
266266
267267The agent will call the provided ` createConnection ` function with ` options ` and
268268this internal ` callback ` . The ` callback ` provided by the agent has a signature
0 commit comments