目录

Rcp_SessionConfiguration

Overview

Session configuration.

Since: 5.0.0(12)

Related module: RemoteCommunication

Header file: rcp.h

Summary

[h2]Member Variables

Name Description
Rcp_SessionType type Session type.
Rcp_InterceptorArray interceptors Custom asynchronous interceptor array.
Rcp_SyncInterceptorArray syncInterceptors Custom synchronous interceptor array.
const char * baseUrl Base URL.
Rcp_Headers * headers Request header.
Rcp_RequestCookies * cookies Request cookies.
Rcp_SessionListener sessionListener Callback function for listening for close() and cancel() events of sessions.
Rcp_Configuration * requestConfiguration Default request configuration. These options can be overridden by Request.configuration.
Rcp_ConnectionConfiguration connectionConfiguration Connection configuration.

Struct Member Variable Description

[h2]baseUrl

const char* Rcp_SessionConfiguration::baseUrl

Description

Base URL.

For example, if the requested URL is ?name=value and the base URL is https://example.com, the final URL would be https://example.com?name=value.

[h2]connectionConfiguration

Rcp_ConnectionConfiguration Rcp_SessionConfiguration::connectionConfiguration

Description

Connection configuration.

This variable specifies the maximum number of concurrent connections allowed in the session and the maximum number of concurrent connections to a single host.

[h2]cookies

Rcp_RequestCookies* Rcp_SessionConfiguration::cookies

Description

Request cookies.

If HMS_Rcp_Fetch or HMS_Rcp_FetchSync is called and Rcp_Request of the parameter does not contain Rcp_RequestCookies, Rcp_SessionConfiguration.cookies will be Rcp_Request.cookies. If both of them exist, they will be combined.

[h2]headers

Rcp_Headers* Rcp_SessionConfiguration::headers

Description

Request header.

If HMS_Rcp_Fetch or HMS_Rcp_FetchSync is called and Rcp_Request does not contain Rcp_Headers, Rcp_SessionConfiguration.headers will be Rcp_Request.headers. If both of them exist, they will be combined.

[h2]interceptors

Rcp_InterceptorArray Rcp_SessionConfiguration::interceptors

Description

Custom asynchronous interceptor array.

Asynchronous interceptors will be converted into an interceptor chain.

If the input is [A, B, C, D], the processing logic will be A -> B -> C -> D -> defaultHandler.

[h2]requestConfiguration

Rcp_Configuration* Rcp_SessionConfiguration::requestConfiguration

Description

Default request configuration. These options can be overridden by Request.configuration.

[h2]sessionListener

Rcp_SessionListener Rcp_SessionConfiguration::sessionListener

Description

Callback function for listening for close() and cancel() events of sessions.

[h2]syncInterceptors

Rcp_SyncInterceptorArray Rcp_SessionConfiguration::syncInterceptors

Description

Custom synchronous interceptor array.

Synchronous interceptors will be converted into an interceptor chain.

If the input is [A, B, C, D], the processing logic will be A -> B -> C -> D -> defaultHandler.

[h2]type

Rcp_SessionType Rcp_SessionConfiguration::type

Description

Session type.