object

# `http_process_transport`

Process-backed HTTP transport predicates using the process library and helper processes.

Availability:
`logtalk_load(http_process_transport(loader))`
Author: Paulo Moura
Version: 1:0:0
Date: 2026-07-17
Compilation flags:
`static, context_switching_calls, threaded`
Implements:
`public` http_transport_protocol
Imports:
`public` options
`public` http_message_helpers
`public` http_text_helpers
Uses:
http_client_core
http_core
http_server_core
list
logtalk
os
process
reader
socket
user
Remarks:
(none)
Inherited public predicates:
check_option/1 check_options/1 close_connection/1 close_connection_pool/1 close_listener/1 connection_pool_stats/2 connection_streams/3 default_option/1 default_options/1 exchange/3 exchange/4 exchange/5 exchange_sequence/3 exchange_sequence/4 open_connection/4 open_connection_pool/4 open_listener/4 option/2 option/3 request_listener_shutdown/1 request_shutdown/1 serve_listener/4 serve_listener/5 serve_once/3 serve_until_shutdown/4 serve_until_shutdown/5 serve_websocket_once/5 supported_request_scheme/1 supported_websocket_scheme/1 valid_option/1 valid_options/1

## Public predicates

### `temporary_tls_credentials/3`

Creates or reuses temporary TLS certificate and key files under the system temporary directory using the given file name prefix.

Compilation flags:
`static`
Template:
`temporary_tls_credentials(Prefix,CertificateFile,KeyFile)`
Mode and number of proofs:
`temporary_tls_credentials(+atom,-atom,-atom)` - `one_or_error`
Exceptions:
`Prefix` is a variable:
`instantiation_error`
`Prefix` is not an atom:
`type_error(atom,Prefix)`
Temporary TLS credentials cannot be created:
`resource_error(http_process_transport_temporary_tls_credentials)`

### `temporary_tls_credentials_files/3`

Computes the temporary TLS certificate and key file paths used for a given file name prefix without creating the files.

Compilation flags:
`static`
Template:
`temporary_tls_credentials_files(Prefix,CertificateFile,KeyFile)`
Mode and number of proofs:
`temporary_tls_credentials_files(+atom,-atom,-atom)` - `one_or_error`
Exceptions:
`Prefix` is a variable:
`instantiation_error`
`Prefix` is not an atom:
`type_error(atom,Prefix)`

## Protected predicates

(no local declarations; see entity ancestors if any)

## Private predicates

### `process_connection_state_/3`

Registered helper-process state for open reusable client connections.

Compilation flags:
`dynamic`
Template:
`process_connection_state_(Connection,Process,Error)`
Mode and number of proofs:
`process_connection_state_(?compound,?ground,?stream)` - `zero_or_more`

### `connection_pool_seed_/1`

Last allocated connection pool identifier.

Compilation flags:
`dynamic`
Template:
`connection_pool_seed_(PoolId)`
Mode and number of proofs:
`connection_pool_seed_(?positive_integer)` - `zero_or_one`

### `connection_pool_config_/6`

Stored connection pool configuration indexed by pool identifier.

Compilation flags:
`dynamic`
Template:
`connection_pool_config_(PoolId,Host,Port,MinSize,MaxSize,ConnectionOptions)`
Mode and number of proofs:
`connection_pool_config_(?positive_integer,?atom,?integer,?non_negative_integer,?positive_integer,?list)` - `zero_or_more`

### `connection_pool_available_/2`

Reusable idle client connections indexed by pool identifier.

Compilation flags:
`dynamic`
Template:
`connection_pool_available_(PoolId,Connection)`
Mode and number of proofs:
`connection_pool_available_(?positive_integer,?compound)` - `zero_or_more`

### `connection_pool_in_use_/2`

Checked-out client connections indexed by pool identifier.

Compilation flags:
`dynamic`
Template:
`connection_pool_in_use_(PoolId,Connection)`
Mode and number of proofs:
`connection_pool_in_use_(?positive_integer,?compound)` - `zero_or_more`

### `listener_seed_/1`

Last allocated listener identifier.

Compilation flags:
`dynamic`
Template:
`listener_seed_(ListenerId)`
Mode and number of proofs:
`listener_seed_(?positive_integer)` - `zero_or_one`

### `process_listener_state_/5`

Registered process state for open listeners.

Compilation flags:
`dynamic`
Template:
`process_listener_state_(ListenerId,Executable,Process,RelayListener,Error)`
Mode and number of proofs:
`process_listener_state_(?positive_integer,?atom,?ground,?compound,?stream)` - `zero_or_more`

### `listener_temporary_tls_credentials_/3`

Tracked temporary TLS credential files owned by open listeners.

Compilation flags:
`dynamic`
Template:
`listener_temporary_tls_credentials_(ListenerId,CertificateFile,KeyFile)`
Mode and number of proofs:
`listener_temporary_tls_credentials_(?positive_integer,?atom,?atom)` - `zero_or_one`

### `listener_handle_alias_/2`

Maps public listener handles to registered process listener identifiers.

Compilation flags:
`dynamic`
Template:
`listener_handle_alias_(Listener,ListenerId)`
Mode and number of proofs:
`listener_handle_alias_(?term,?positive_integer)` - `zero_or_more`

### `listener_event_/2`

Queued listener events parsed from the listener helper diagnostics stream.

Compilation flags:
`dynamic`
Template:
`listener_event_(ListenerId,Event)`
Mode and number of proofs:
`listener_event_(?positive_integer,?compound)` - `zero_or_more`

### `process_listener_shutdown_requested_/1`

Flag recording that a synthetic listener shutdown wakeup is pending.

Compilation flags:
`dynamic`
Template:
`process_listener_shutdown_requested_(ListenerId)`
Mode and number of proofs:
`process_listener_shutdown_requested_(?positive_integer)` - `zero_or_one`

### `listener_shutdown_seed_/1`

Last allocated shutdown-run identifier.

Compilation flags:
`dynamic`
Template:
`listener_shutdown_seed_(RunId)`
Mode and number of proofs:
`listener_shutdown_seed_(?positive_integer)` - `zero_or_one`

### `listener_shutdown_control_/3`

Maps public shutdown control terms to listeners and active serving runs.

Compilation flags:
`dynamic`
Template:
`listener_shutdown_control_(Control,Listener,RunId)`
Mode and number of proofs:
`listener_shutdown_control_(?nonvar,?compound,?positive_integer)` - `zero_or_more`

### `listener_shutdown_requested_/2`

Recorded shutdown requests for serve_until_shutdown/4 runs.

Compilation flags:
`dynamic`
Template:
`listener_shutdown_requested_(Control,RunId)`
Mode and number of proofs:
`listener_shutdown_requested_(?nonvar,?positive_integer)` - `zero_or_one`

### `listener_active_worker_/3`

Tracked active connection workers for a serve_until_shutdown/4 run.

Compilation flags:
`dynamic`
Template:
`listener_active_worker_(Control,RunId,Worker)`
Mode and number of proofs:
`listener_active_worker_(?nonvar,?positive_integer,?compound)` - `zero_or_more`

## Operators

(none)