Skip to main content
Table of Contents

TTMSMCPCustomServer.SetSessionValue Method

Stores a string value against the session whose request is being handled on the calling thread, so state can be carried between calls from the same client.

API unit family: TMS.MCP.Server Declaring type: TTMSMCPCustomServer

Overloads

Overload 1

Stores a string value against the session whose request is being handled on the calling thread, so state can be carried between calls from the same client.

TMS.MCP.Server.hppPascalC++
procedure SetSessionValue(const AKey, AValue: string); overload;
void __fastcall SetSessionValue(const System::UnicodeString AKey, const System::UnicodeString AValue)/* overload */;

Remarks

Does nothing outside a request or on a transport without sessions, because there is no session to store against.

Parameters

Name Description
AKey Key to store under.
AValue Value to store.

Overload 2

Stores a string value against a specific session, regardless of which request is being handled. Does nothing when the identifier is empty or unknown.

TMS.MCP.Server.hppPascalC++
procedure SetSessionValue(const ASessionId, AKey, AValue: string); overload;
void __fastcall SetSessionValue(const System::UnicodeString ASessionId, const System::UnicodeString AKey, const System::UnicodeString AValue)/* overload */;

Parameters

Name Description
ASessionId Identifier of the session to store against.
AKey Key to store under.
AValue Value to store.