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