TsgcWSPClient_MQTT › 속성 › ConnectProperties
CONNECT 패킷과 함께 보내는 MQTT 5.0 속성: session expiry, receive maximum, packet size, topic aliases 및 확장 인증.
property ConnectProperties: TsgcWSMQTTConnect_Properties read FConnectProperties write SetConnectProperties;
Enabled=False, SessionExpiryInterval=0, ReceiveMaximum=65535, MaximumPacketSize=MaxInt, TopicAliasMaximum=0, RequestResponseInformation=False, RequestProblemInformation=True
(MQTT 5.0 전용.) MQTTVersion = mqtt311일 때 하위 속성은 무시됩니다. 블록을 CONNECT 변수 헤더로 직렬화하려면 Enabled를 True로 설정하십시오. 필드에는 SessionExpiryInterval(초; 0은 네트워크 연결이 닫힐 때 세션을 종료함), ReceiveMaximum(클라이언트가 처리할 최대 동시 QoS 1 / QoS 2 게시), MaximumPacketSize(클라이언트가 수락할 가장 큰 패킷), TopicAliasMaximum(최대 들어오는 Topic Alias 값), RequestResponseInformation(브로커가 CONNACK에서 Response Information을 반환하도록 요청), RequestProblemInformation(브로커가 Reason String 및 User Properties를 포함하도록 허용), UserProperties(사용자 정의 name=value 진단 데이터) 및 AuthenticationMethod(Auth 메서드와 함께 사용되는 확장 인증 메서드 이름)가 포함됩니다.
MQTT.MQTTVersion := mqtt5;
MQTT.ConnectProperties.Enabled := True;
MQTT.ConnectProperties.SessionExpiryInterval := 3600;
MQTT.ConnectProperties.ReceiveMaximum := 20;
MQTT.ConnectProperties.TopicAliasMaximum := 10;
MQTT.ConnectProperties.UserProperties.Add('app=sensor-01');