diff --git a/StompTypes.pas b/StompTypes.pas index 8102f679..012b451e 100644 --- a/StompTypes.pas +++ b/StompTypes.pas @@ -62,6 +62,7 @@ type function GetBody: string; procedure SetBody(const Value: string); function GetHeaders: IStompHeaders; + function MessageID: string; end; IStompClient = interface @@ -145,6 +146,7 @@ type // return '', when Key doesn't exist or Value of Key is '' // otherwise, return Value; function Output: string; + function MessageID: string; property Headers: IStompHeaders read GetHeaders write SetHeaders; end; @@ -294,6 +296,11 @@ begin Result := FHeaders; end; +function TStompFrame.MessageID: string; +begin + Result := self.GetHeaders.Value(TStompHeaders.MESSAGE_ID); +end; + function TStompFrame.Output: string; begin Result := FCommand + LINE_END + FHeaders.Output + LINE_END + FBody + COMMAND_END;