Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,19 +253,19 @@ added: v0.11.4

Produces a socket/stream to be used for HTTP requests.

By default, this function behaves identically to [`net.createConnection(options)`][],
By default, this function behaves identically to [`net.createConnection()`][],
synchronously returning the created socket. The optional `callback` parameter in the
signature is **not** used by this default implementation.

However, custom agents may override this method to provide greater flexibility,
for example, to create sockets asynchronously. When overriding `createConnection`:

1. **Synchronous socket creation**: The overriding method can return the
socket/stream directly.
2. **Asynchronous socket creation**: The overriding method can accept the `callback`
and pass the created socket/stream to it (e.g., `callback(null, newSocket)`).
If an error occurs during socket creation, it should be passed as the first
argument to the `callback` (e.g., `callback(err)`).
1. **Synchronous socket creation**: The overriding method can return the
socket/stream directly.
2. **Asynchronous socket creation**: The overriding method can accept the `callback`
and pass the created socket/stream to it (e.g., `callback(null, newSocket)`).
If an error occurs during socket creation, it should be passed as the first
argument to the `callback` (e.g., `callback(err)`).

The agent will call the provided `createConnection` function with `options` and
this internal `callback`. The `callback` provided by the agent has a signature
Expand Down
3 changes: 2 additions & 1 deletion doc/api/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ An [`Agent`][] object for HTTPS similar to [`http.Agent`][]. See
Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden
to customize how TLS connections are established.

> See [`http.Agent#createConnection()`][] for details on overriding this method,
> See [`agent.createConnection()`][] for details on overriding this method,
> including asynchronous socket creation with a callback.

### `new Agent([options])`
Expand Down Expand Up @@ -744,6 +744,7 @@ statusCode: 200
[`Agent`]: #class-httpsagent
[`Session Resumption`]: tls.md#session-resumption
[`URL`]: url.md#the-whatwg-url-api
[`agent.createConnection()`]: http.md#agentcreateconnectionoptions-callback
[`http.Agent(options)`]: http.md#new-agentoptions
[`http.Agent`]: http.md#class-httpagent
[`http.ClientRequest`]: http.md#class-httpclientrequest
Expand Down
7 changes: 2 additions & 5 deletions glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ This file documents various terms and definitions used throughout the Node.js co

* **ABI**: [Application Binary Interface][] - Defines the interface between two binary program modules.
* **AFAICT**: As Far As I Can Tell.
* **AFAICT**: As Far As I Can Tell.
* **AFAIK**: As Far As I Know.
* **AFAIK**: As Far As I Know.
* **API**: [Application Programming Interface][] - A set of rules and protocols that allows different software
applications to communicate with each other. APIs are used to enable integration between different systems.
* **ASAP**: As Soon As Possible.
* **ASLR**: Address Space Layout Randomization. A security technique that randomizes memory addresses to prevent certain attacks.
* **ASLR**: Address Space Layout Randomization. A security technique that randomizes memory addresses
to prevent certain attacks.
* **Backport**: The process of applying a fix or feature from a newer branch to an older supported
branch (e.g., applying a security fix to an LTS release).
* **BE** ([Big Endian]): Byte order in which the most significant byte is stored first in memory.
Opposite of **LE** (Little Endian).
* **BE**: Big [Endian][] - A Byte Order where the largest bit comes first. The opposite of **LE**.
* **Bootstrap**: Early phase in the Node.js process startup - sets up the execution environment and loads internal
modules.
Expand Down
Loading